Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java repaint the frame or the panel?

 
Anu Bhagat
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am stuck on the repaint issue.

Here is the description of the problem

I have a myFrame which extends from JFrame,
I have myPanel (JPanel) and I add this to myFrame,

I then make few components and add them to myPanel

I move these components around in myPanel.. now I set a new size of myPanel.

I repaint myPanel. My components appear fine but myPanel does not resize to the new size that I set above.

This is done in a large application so I don not have code to provide.

I am really stuck on this problem, and would deeply appreciate any help.

Thanks in advance..

Anu
 
Darryl Burke
Bartender
Posts: 5155
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Learn to use layout managers, and use them correctly.
 
Anu Bhagat
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved it. It was a simple oversight on my part. Thanks for listening to me.

Anu
 
Cob is sand, clay and sometimes straw. This tiny ad is made of cob:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!