Home » questions » Java - JTabbedPane displays components after switching tabs, how do i get it to show w/o switching t

Java - JTabbedPane displays components after switching tabs, how do i get it to show w/o switching t

2006-08-11 13:06:01, Category: Programming & Design
I have 2 tabs on a JTabbPane, when I load the program, all the components show up except for the BorderLayout.CENTER component (a TextArea that is created at the same time as the other components, however the TextArea will be appended when a certain JButton is pushed). When I switch from tab 1 to tab 2, the center component shows up in tab 2 and when I switch back, it will show up in tab 1 and when I press the correct JButton, the table is appended correctly. Other times when I compile and run the program, it will display the TextArea and allow it to be appended correctly with out having to switch tabs. Any ideas? Thanks!

Answers

  1. jack573

    On 2006-08-15 08:11:26


    Perhaps a java bug. Check the java website for their bugs.[1] A quick search was done on 'JTabbedPane' and returned these results.[2] You will have to look yourself if anything is worthwhile, as I do not know your exact problem. I mean, what other classes are you using, how is it called, etc.