• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Layout ,scrollbar problem

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Hoo hoo hoo! Looks like we got a live one! Here, wave this tiny ad at it:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic