Results 1 to 6 of 6
  1. #1
    teo
    teo is offline Member
    Join Date
    Jun 2008
    Posts
    3
    Rep Power
    0

    Default [SOLVED] MenuButton

    Hi,

    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.

    Thanks

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    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.

  3. #3
    teo
    teo is offline Member
    Join Date
    Jun 2008
    Posts
    3
    Rep Power
    0

    Default Sorry

    Ok Sorry i just wanted more people to read it cause some people use one forum some others another one.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    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.

  5. #5
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    9

    Default

    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

  6. #6
    teo
    teo is offline Member
    Join Date
    Jun 2008
    Posts
    3
    Rep Power
    0

    Default Thanks

    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •