Results 1 to 5 of 5
Thread: Drawing on a Panel
- 06-06-2012, 03:00 AM #1
Member
- Join Date
- Jun 2012
- Posts
- 1
- Rep Power
- 0
- 06-06-2012, 03:56 AM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,619
- Rep Power
- 5
Re: Drawing on a Panel
You should provide context in the form of a SSCCE - concentrating on one thing at a time. I can render a guess that you are adding components after the JFrame is visible, but can only guess given the amount of information.
- 07-04-2012, 04:24 AM #3
Member
- Join Date
- Jul 2012
- Posts
- 27
- Rep Power
- 0
Re: Drawing on a Panel
I think this will work. When the window is ready then it does the following code.
I hope this works.Java Code:panel.addWindowListener(new WindowAdapter() { public void windowActivated(WindowEvent e) { repaint(); } });
-
Re: Drawing on a Panel
- 07-04-2012, 05:07 AM #5
Member
- Join Date
- Jul 2012
- Posts
- 27
- Rep Power
- 0
Similar Threads
-
panel on a panel not visible
By warchieflll in forum Advanced JavaReplies: 2Last Post: 01-29-2011, 08:29 PM -
Add panel to parent panel
By LovJava in forum AWT / SwingReplies: 10Last Post: 09-02-2010, 08:43 PM -
Panel in a panel?
By pahiker in forum AWT / SwingReplies: 1Last Post: 07-05-2010, 11:42 AM -
Adding a panel to a panel
By rclausing in forum New To JavaReplies: 7Last Post: 02-02-2010, 05:56 AM -
Undoable Drawing Panel
By Java Tip in forum javax.swingReplies: 1Last Post: 04-13-2009, 02:27 PM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks