i am not new to java but new to swing. I have had no problems till now in doing buttons or textfields or menus but now even internet doesn't find what i want:) I am trying to make a button with a menu (like the create new class button in eclipse or profile main project in NetBeans) That is a button in two pieces where one piece has an arrow and through clicking this arrow it opens a menu.
Can someone please help me with the code for that.
Cross-posted in the Sun java forum.
Please don't cross-post questions in multiple forums. Imagine how frustrating it is for a volunteer to work towards an answer, post it, only to find that the answer was already provided in a cross-post. For this reason, many refuse to help habitual cross-posters.
Ok Sorry i just wanted more people to read it cause some people use one forum some others another one.
I understand, but please understand it from our point of view. It also is a violation of the forum rules that you agreed to on joining this forum.
like the create new class button in eclipse or profile main project in NetBeans
I don't have access to these.
Here's a link to something I did some time ago (OptionComponent); maybe you can get some ideas from it.
Drop Down Menu Buttons
Thank you for your help.
As i see you have written the code for every line that should be visible if the element is activated and you have also calculated the coordinates of the place where the arrow should be placed. This is also what i wanted but doesn't java have an element like this?