Repaint J Pane problem ?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 1 of 1

Thread: Repaint J Pane problem ?

  1. #1
    Join Date
    Feb 2004
    Posts
    1

    Question 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 11: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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center