Article View: borland.public.jbuilder.java.swing
Article #1228JB 9 designer help
From: Sven Goetgeluck
Date: Tue, 24 Feb 2004 16:04
Date: Tue, 24 Feb 2004 16:04
115 lines
4014 bytes
4014 bytes
hi ,
when opening my dialog in designer i'll get following error
java.lang.IllegalAccessException: Class com.borland.jbuilder.cmt.jb.JbValue
can not access a member of class vrex4.MyScrollPane with modifiers "public"
new MyScrollPane()
anybody has an idea what it means??
thanks Sven
this is the code for the scrollpane
class MyScrollPane
extends JScrollPane {
private static boolean doReset = true;
public MyScrollPane(Component view, int vsbPolicy, int hsbPolicy) {
super(view, vsbPolicy, hsbPolicy);
// Set the component to transparent
if (view instanceof JComponent) {
( (JComponent) view).setOpaque(false);
}
this.getHorizontalScrollBar().addAdjustmentListener(
new AdjustmentListener() {
public void adjustmentValueChanged(AdjustmentEvent ae) {
if (ae.getSource()instanceof JScrollBar) {
// ( (JScrollBar) ae.getSource()).setValue(0);
if (doReset) {
doReset = false;
((JScrollBar)
ae.getSource()).setValue(0);
doReset = false;
}
}
}
});
this.getVerticalScrollBar().addAdjustmentListener(
new AdjustmentListener() {
public void adjustmentValueChanged(AdjustmentEvent ae) {
if (ae.getSource()instanceof JScrollBar) {
if (doReset) {
doReset = false;
((JScrollBar) ae.getSource()).setValue(0);
doReset = false;
}
}
}
}
);
}
public void setReset(boolean sw) {
doReset = sw;
this.getVerticalScrollBar().setValue(0);
this.getHorizontalScrollBar().setValue(0);
}
public MyScrollPane(Component view) {
this(view, VERTICAL_SCROLLBAR_AS_NEEDED,
HORIZONTAL_SCROLLBAR_AS_NEEDED);
}
public MyScrollPane(int vsbPolicy, int hsbPolicy) {
this(null, vsbPolicy, hsbPolicy);
}
public MyScrollPane() {
this(null, VERTICAL_SCROLLBAR_AS_NEEDED,
HORIZONTAL_SCROLLBAR_AS_NEEDED);
}
public void paint(Graphics g) {
Graphics2D g2 = (Graphics2D) g;
if (image != null) {
// Draw the background image
Rectangle d = getViewport().getViewRect();
for (int x = 0; x < d.width; x += image.getIconWidth()) {
for (int y = 0; y < d.height; y += image.getIconHeight()) {
g2.drawImage(image.getImage(), x, y, null, null);
// Do not use cached image for scrolling
}
}
getViewport().setScrollMode(JViewport.BACKINGSTORE_SCROLL_MODE);
}
super.paint(g2);
setOpaque(false);
System.gc();
}
public void setBackgroundImage(ImageIcon image) {
this.image = image;
}
ImageIcon image = null;
}
Technical Details
Message-ID:
<403b7615$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!news3.optonline.net!nx02.iad01.newshosting.com!newshosting.com!newshosting.com!nx01.iad01.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,585e9cb8fb2f0dbd,start X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2004-02-24 08:12:06 PST From: "Sven Goetgeluck" <sven.goetgeluck@pandora.be> Newsgroups: borland.public.jbuilder.java.swing Subject: JB 9 designer help Date: Tue, 24 Feb 2004 17:04:40 +0100 Lines: 117 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 217.136.183.76 Message-ID: <403b7615$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1077638677 217.136.183.76 (24 Feb 2004 08:04:37 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!news3.optonline.net!nx02.iad01.newshosting.com!newshosting.com!newshosting.com!nx01.iad01.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail