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 PostWhat if when you resize the JFrame, you pass the JTabbedPane the width and height through the
resize(int width, int height)
method while resizing the JFrame?
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 …
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.