Java GUI question.

notfred

Lifer
Feb 12, 2001
38,241
4
0
Is there a class for displaying a list of items, kind of like how napster or kazaa displays a list of downloads?

I could make a vertical box filled with a bunch of horizontal boxes, but I was wondering if there's any easier way to do it? Basically I want an interface similar to napster where each line displays a String, a button "delete", and possibly another widget or two. Any easy way to make this look nice?
 

Kilrsat

Golden Member
Jul 16, 2001
1,072
0
0
Using a JTable is one method.

Another is to set up a gridbag layout.

I'm leaving work in ~5 minutes, but I'll have more details with examples when I get home.

For now: JTable Howto
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
While we're on the subject of java GUIs, is there way to make an icon for a java program in windows (To show up in Explorer, the taskbar, etc)? Apple's developer tools allows you to compile java into .app files, with custom icons, but I don't know how to do the same thing on windows. I know it's possible, as BlueJ does it.
 

Kilrsat

Golden Member
Jul 16, 2001
1,072
0
0
Can't help you there, I create a VB or C wrapper exe if I'm going to package something for easier launch on a given platform.
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
That might be what BlueJ uses, too... I really wish they'd make it open source, It's free and targeted to students. Why not make it open source?
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Oh... one more thing, can I set the focus to null, or the whole window, or something? I really hate those little borders around buttons.