-
Repaint J Pane problem ?
I am trying to remove objects from a jpane and then add new ones, basicly redrawing the screen. however i can not get the screen to refresh correctly.
if i use the code
this.getContentPane().removeAll();
jTextPane2.setText("A new pane was added!!");
contentPane.add(jTextPane2, new XYConstraints(122, 102, 123, 87));
it removes everythign but notthing new is added even if i use the repaint command.
if i use the code
this.getContentPane().remove(jTextPane1);
jTextPane2.setText("A new pane was added!!");
contentPane.add(jTextPane2, new XYConstraints(122, 102, 123, 87));
and call it twice then the first time the old text pane is removed the secodn time the newone is added.
i also tried using differnt jpane but i get a run time error that says pane can not be added to a parent.
can any tell me what i doing worng or how to do what i want to
Last edited by dagz; 02-27-2004 at 10:53 AM.
Dagz
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks