Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / June 2004

Tip: Looking for answers? Try searching our database.

scrollpane

Thread view: 
Bert - 12 Jun 2004 12:43 GMT
Hello,

I have a JPanel with a variable number of JButtons (with an Image in it).
There are more buttons than the screen can show, so I want to make a
scrollpane.where I can scroll through al JButtons (vertically). There should
be as many Jbuttons on the screen as possble (thus in a grid).

How can I do this?

Currently I can show the scrollbar, but the buttons are in a single col or
row.

// make the panel
overviewPanel = new JPanel();
JScrollPane myScrollPane= new JScrollPane(overviewPanel );

//
for (int i=0;i<20;i++) {
overviewPanel.add(new JButton());
}

greetings
Hal Rosser - 13 Jun 2004 07:50 GMT
Try using the JTabbedPane - or a JComboBox

> Hello,
>
[quoted text clipped - 18 lines]
>
> greetings


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.