Results 1 to 4 of 4
- 03-18-2009, 01:03 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 4
- Rep Power
- 0
Not another Jpanel Scrollbar problem!
I am using Netbeans gui designer
I create a new JDialog
inserted a panel in the middle which i require to be scrollable as it gets larger and filled with components
So when i enter the panels Customized Code this is what i have
What else do i have to do.. I've tried a million things and still no scrollbar appears! Please help me its urgentJava Code:jPanel16 = new javax.swing.JPanel(); jPanel16.setBackground(new java.awt.Color(255, 153, 153)); jPanel16.setMaximumSize(new java.awt.Dimension(520, 270)); JScrollPane sp = new JScrollPane(jPanel16, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
-
1) Are you placing the JPanel inside of a JScrollPane?
2) Have you read the Sun Swing tutorial on how to use scrollpanes?
3) Have you tried setting the preferredSize of components in particular the JPanel placed in the JScrollPane?
- 03-18-2009, 01:31 AM #3
Member
- Join Date
- Mar 2009
- Posts
- 4
- Rep Power
- 0
Perfect set of questions :)
Thanks for pointing me in the right direction fuburable!
just cant believe this took me so long to figure out :(
-
Similar Threads
-
Problem on adding JButton on JPanel NEED HELP
By boisk in forum AWT / SwingReplies: 15Last Post: 03-15-2009, 02:27 PM -
how to add scrollbar in netbeans
By kumar_gemi in forum NetBeansReplies: 1Last Post: 03-12-2009, 06:50 PM -
JFileChooser horizontal scrollbar problem
By nenadm in forum AWT / SwingReplies: 4Last Post: 11-12-2008, 11:16 AM -
Using java.awt.Scrollbar
By Java Tip in forum Java TipReplies: 0Last Post: 01-03-2008, 09:19 AM -
Problem with JPanel
By ibanez270dx in forum New To JavaReplies: 2Last Post: 11-09-2007, 05:04 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks