I have a JTabbedPane inside a JFrame. I've been having a lot of problems with resizing and things like that. . how do I get the JTabbledPane to resize with the JFrame? So when the user drags the window open to a larger size, the JTabbedPane should be dragged to the same size. Can this be done automatically?
BestJewSinceJC 700 Posting Maven
Recommended Answers
Jump to PostIt depends entirely on the layout manager you have set and how you add the JTabbedPane component. It will behave like any other container component in that context.
JTabbedPane tabPane = new JTabbedPane(); tabPane.add("Test 1",new JPanel()); tabPane.add("Test 2",new JPanel()); getContentPane().add(tabPane); pack();
will create a tabbed pane that …
Jump to PostIf you are creating that layout in Netbeans, keep in mind that it just decides to use the GroupLayout by default for a new JFrame rather than the old default of FlowLayout, which may throw you off if you aren't expecting it. If that is the case, you can explicitly …
All 7 Replies
llemes4011 31 Posting Whiz in Training
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
BestJewSinceJC 700 Posting Maven
BestJewSinceJC 700 Posting Maven
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
BestJewSinceJC 700 Posting Maven
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.