Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Layout ,scrollbar problem  RSS feed

 
Venkata Kiran
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
I need a layout similar to
---------------------------------------------------------
|button a,b,c in flow layout, buttons d,e in card layout
|---------------------------------------------------------
|
| Image
|---------------------------------------------------------
| Scrollbar
----------------------------------------------------------
The problem is the scrollbar is being displayed in the first panel
along with cardlayout and is not visible at the bottom.

& is it possible to have labels at both the end of scrollbars like in
ColorChooser Applet for rbg.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cardlayoutPanel = new Panel(cardlayout) // add d,e buttons
northPanel = new JPanel() //add a,b,c buttons, and cardlayoutPanel
imagelabel = new JLabel(image)
scrollPane = new ScrollPane(imageLabel,horScrlBar.ALWAYS,vertScrlBar.NEVER)

holdingPanel = new JPanel(borderLayout)
add northPanel to NORTH
add scrollPane to CENTER

add holdingPanel to contentPane/frame
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!