It's not a secret anymore!
The moose likes Swing / AWT / SWT and the fly likes JButton with bad Labels Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JButton with bad Labels" Watch "JButton with bad Labels" New topic

JButton with bad Labels

Kevin Hamrick
Ranch Hand

Joined: Aug 30, 2004
Posts: 37
I loop through and make some JButtons but they don't display the correct names. Here is what is showing on each button.
and here is the code

As you can see i've done a lot of debugging and trying different approaches but nothing works. All I want are these buttons in the header of my JTable with the specified labels.
P.S. Swing is new to me, if someone could recommend a good reference that would be great.
jefff willis
Ranch Hand

Joined: Sep 29, 2004
Posts: 113
invoke the toString() method of your array elements:

Just copy and past the code .
I agree. Here's the link:
subject: JButton with bad Labels
It's not a secret anymore!