Results 1 to 1 of 1
Thread: Why the panel text changed?
- 12-16-2007, 05:16 PM #1Member
- Join Date
- Dec 2007
- Rep Power
Why the panel text changed?
OOOPS, I need to move this to AWT/Swing forum.
Hello, I ran into a strange problem:
I have two panels in sequence, both of them displayed from the same JFrame. The JFrame has an Image in the "West" (BorderLayoutManeger). The image is shared between the two panels. The problematic part is the JPanel in the center, which is different from panel to panel.
The first time, a new JPanel is added and a non-editable JEditorPane is added to the JPanel. It displays Text "AAA". I can minimize or hide the panel and then bring the panel back. No problem.
Later a new JPanel is created and a JLabel is added the the new JPanel, and the the new JPanel is set to the center of the JFrame. It first displays text "BBB" properly. But when I minimize or hide the panel, and then bring the panel back, the panel goes back to text "AAA". And it always displays "AAA".
Thanks in advance.
Last edited by ottawalyli; 12-17-2007 at 06:26 AM.
- By RebelScum in forum New To JavaReplies: 0Last Post: 03-21-2008, 05:22 PM
- By ottawalyli in forum AWT / SwingReplies: 1Last Post: 12-17-2007, 06:56 AM
- By vivek_9912 in forum AWT / SwingReplies: 2Last Post: 11-20-2007, 12:21 AM
- By fernando in forum AWT / SwingReplies: 2Last Post: 08-07-2007, 11:19 PM
- By anjanesh in forum New To JavaReplies: 4Last Post: 05-19-2007, 04:08 PM