Which Swing Component is this?

T

Trung Chinh Nguyen

Hi,

I'm looking for some kind of button which shows something like a
JPopupMenu when clicked (something similar to the Back button of Firefox
when you click the little triangle next to it). Is it a Swing Component
or a custom one?
 
E

Eric Sosman

Trung said:
Hi,

I'm looking for some kind of button which shows something like a
JPopupMenu when clicked (something similar to the Back button of Firefox
when you click the little triangle next to it). Is it a Swing Component
or a custom one?

JComboBox, perhaps?
 
T

Trung Chinh Nguyen

It is similar to JComboBox, except:
- The text on the button is not an element of the list
- The text does not change when you select an item
 
N

Natasha Lloyd

I'm looking for some kind of button which shows something like a
JPopupMenu when clicked (something similar to the Back button of Firefox
when you click the little triangle next to it). Is it a Swing Component
or a custom one?

It is not an available Swing component. You have to add an action
listener to a button which will show a JPopupMenu when clicked.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top