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 / January 2005

Tip: Looking for answers? Try searching our database.

JFrame and dynamically adding of icons with equal spacing

Thread view: 
Anders - 11 Jan 2005 03:49 GMT
Hi, i have this chat system that i made, and i wanna make it with rooms.
So i want the lobby gui (A JFrame) to have some images resembling rooms
that you can click on to enter a room.

I would like them to be added incrementally, and have like a scrollpane
that scrolls down so that i can add as many as i would like. Adding them
incrementally is thus the key. How do i go about adding them dynamically
to the gui with equal spacings between them and let's say at first, 6 in
one row and potentially infinity downwards?
Yanick - 11 Jan 2005 05:30 GMT
I would use a JTable. Make your own renderer to return a component (probably
a JPanel) with what you need in it.

-Yanick

> Hi, i have this chat system that i made, and i wanna make it with rooms.
> So i want the lobby gui (A JFrame) to have some images resembling rooms
[quoted text clipped - 5 lines]
> to the gui with equal spacings between them and let's say at first, 6 in
> one row and potentially infinity downwards?


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.