Re: JScrollBar Repaint Question
- From: "Andrew Thompson" <andrewthommo@xxxxxxxxx>
- Date: 28 Dec 2006 05:53:34 -0800
mearvk wrote:
While working on some sandbox code to post here I was unable to get the....
same glitch to manifest itself.
Working code looks like:
I doubt that the real problem is fixed*.
public void paintComponent(Graphics g)
{
scrollPane.setSize(getWidth()-30,getHeight()-150);
textField.setSize(getWidth()-30,25);
textField.setLocation(10,getHeight()-130);
send.setLocation(getWidth()/2,textField.getY()+35);
cancel.setLocation(getWidth()/2-110,textField.getY()+35);
super.paintComponent(g);
}
This code is extremely fragile, and will might break
under the next Java version, on a different screen,
with different screensize, or under a different PLAF..
You should proceed with posting SSCCE's**, or at least
* figure why the behaviour suddenly disappears.
** <http://www.physci.org/codes/sscce>
Andrew T.
.
- References:
- JScrollBar Repaint Question
- From: mearvk
- Re: JScrollBar Repaint Question
- From: mearvk
- Re: JScrollBar Repaint Question
- From: Oliver Wong
- Re: JScrollBar Repaint Question
- From: mearvk
- Re: JScrollBar Repaint Question
- From: Oliver Wong
- Re: JScrollBar Repaint Question
- From: mearvk
- JScrollBar Repaint Question
- Prev by Date: Re: JTextField - how to disable selecting text in this component?
- Next by Date: Re: JScrollBar Repaint Question
- Previous by thread: Re: JScrollBar Repaint Question
- Next by thread: Re: JScrollBar Repaint Question
- Index(es):