JComboBox width, dropdown list width

Discussion in 'Java' started by Xu, Jul 13, 2005.

  1. Xu

    Xu Guest

    Hi i am wondering if there is a simple way to reduce a jcombobox visual
    size (i want only to display the dropdown button).
    When i use jcombobox.setPreferedSize(20,20); the drop down list is also
    reduced width=20.. but i want that the dropdown list to be width
    according to a item(string).
     
    Xu, Jul 13, 2005
    #1
    1. Advertising

  2. On Wed, 13 Jul 2005 09:41:35 +0200, Xu wrote:

    > Hi i am wondering if there is a simple way to reduce a jcombobox visual
    > size (i want only to display the dropdown button).
    > When i use jcombobox.setPreferedSize(20,20); the drop down list is also
    > reduced width=20.. but i want that the dropdown list to be width
    > according to a item(string).


    Sounds more like a Menu you are after. Or at least that
    is what the end user would probably prefer to a drop-down
    list that looks or behaves in a way that is 'unusual'..

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    LIVE From Omicron Persei 8
     
    Andrew Thompson, Jul 13, 2005
    #2
    1. Advertising

  3. Xu

    Xu Guest

    Andrew Thompson wrote:
    > On Wed, 13 Jul 2005 09:41:35 +0200, Xu wrote:
    >
    >
    >>Hi i am wondering if there is a simple way to reduce a jcombobox visual
    >>size (i want only to display the dropdown button).
    >>When i use jcombobox.setPreferedSize(20,20); the drop down list is also
    >>reduced width=20.. but i want that the dropdown list to be width
    >>according to a item(string).

    >
    >
    > Sounds more like a Menu you are after. Or at least that
    > is what the end user would probably prefer to a drop-down
    > list that looks or behaves in a way that is 'unusual'..
    >

    I am trying to create a JButton + JComboBox, i dont know how those
    widget are called.. but you can find them in firefox or in internet
    explorer.(Back and Forward Button's).
     
    Xu, Jul 13, 2005
    #3
  4. On Wed, 13 Jul 2005 12:31:08 +0200, Xu wrote:
    > Andrew Thompson wrote:
    >> On Wed, 13 Jul 2005 09:41:35 +0200, Xu wrote:
    >>
    >>>Hi i am wondering if there is a simple way to reduce a jcombobox visual
    >>>size

    ...
    >> Sounds more like a Menu you are after. Or at least that
    >> is what the end user would probably prefer to a drop-down
    >> list that looks or behaves in a way that is 'unusual'..


    > ..you can find them in firefox or in internet
    > explorer.(Back and Forward Button's).


    Aha! Good point. Yes.. I not only see the type
    of control you mean, but am so used to using it
    I barely notice it. This pretty much blows my theory
    of 'unusual' out of the water!

    I'll wait to see what the GUI experts here on..
    Wait a second.. You won't find the GUI experts here!
    These c.l.j.programmers could not hack out a GUI if
    their life depended on it. [ ;-) ]

    I suggest you
    a) put this question to comp.lang.java.gui
    b) mention you had your time wasted by a c.l.j.programmer
    (more to warn of/explain the multi-post)
    c) Mention the FF/IE back button.
    (A picture paints a thousand words!)

    HTH

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    Mr Bender's Wardrobe By ROBOTANY 500
     
    Andrew Thompson, Jul 13, 2005
    #4
  5. Xu

    Xu Guest

    Andrew Thompson wrote:
    > On Wed, 13 Jul 2005 12:31:08 +0200, Xu wrote:
    >
    >>Andrew Thompson wrote:
    >>
    >>>On Wed, 13 Jul 2005 09:41:35 +0200, Xu wrote:
    >>>
    >>>
    >>>>Hi i am wondering if there is a simple way to reduce a jcombobox visual
    >>>>size

    >
    > ..
    >
    >>>Sounds more like a Menu you are after. Or at least that
    >>>is what the end user would probably prefer to a drop-down
    >>>list that looks or behaves in a way that is 'unusual'..

    >
    >
    >>..you can find them in firefox or in internet
    >>explorer.(Back and Forward Button's).

    >
    >
    > Aha! Good point. Yes.. I not only see the type
    > of control you mean, but am so used to using it
    > I barely notice it. This pretty much blows my theory
    > of 'unusual' out of the water!
    >
    > I'll wait to see what the GUI experts here on..
    > Wait a second.. You won't find the GUI experts here!
    > These c.l.j.programmers could not hack out a GUI if
    > their life depended on it. [ ;-) ]
    >
    > I suggest you
    > a) put this question to comp.lang.java.gui
    > b) mention you had your time wasted by a c.l.j.programmer
    > (more to warn of/explain the multi-post)
    > c) Mention the FF/IE back button.
    > (A picture paints a thousand words!)
    >
    > HTH
    >

    Ah ok.. tnx for your advise :)
     
    Xu, Jul 13, 2005
    #5
  6. On Wed, 13 Jul 2005 14:21:04 +0200, Xu wrote:

    > Ah ok.. tnx for your advise :)


    You're welcome.

    I saw your post on c.l.j.gui. Hope you
    find your optimal solution.

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    Soon To Be A Major Religion
     
    Andrew Thompson, Jul 13, 2005
    #6
  7. Andrew Thompson coughed up:
    > On Wed, 13 Jul 2005 12:31:08 +0200, Xu wrote:
    >> Andrew Thompson wrote:
    >>> On Wed, 13 Jul 2005 09:41:35 +0200, Xu wrote:
    >>>
    >>>> Hi i am wondering if there is a simple way to reduce a jcombobox
    >>>> visual size

    > ..
    >>> Sounds more like a Menu you are after. Or at least that
    >>> is what the end user would probably prefer to a drop-down
    >>> list that looks or behaves in a way that is 'unusual'..

    >
    >> ..you can find them in firefox or in internet
    >> explorer.(Back and Forward Button's).

    >
    > Aha! Good point. Yes.. I not only see the type
    > of control you mean, but am so used to using it
    > I barely notice it. This pretty much blows my theory
    > of 'unusual' out of the water!
    >
    > I'll wait to see what the GUI experts here on..
    > Wait a second.. You won't find the GUI experts here!
    > These c.l.j.programmers could not hack out a GUI if
    > their life depended on it. [ ;-) ]


    WHAT!!!???!!!!!

    {author thumbs through ebay for a sniper rifle...}


    >
    > I suggest you
    > a) put this question to comp.lang.java.gui
    > b) mention you had your time wasted by a c.l.j.programmer
    > (more to warn of/explain the multi-post)
    > c) Mention the FF/IE back button.
    > (A picture paints a thousand words!)
    >
    > HTH




    --
    "So I just, uh... I just cut them up like regular chickens?"
    "Sure, just cut them up like regular chickens."
     
    Thomas G. Marshall, Jul 14, 2005
    #7
  8. Xu

    Xu Guest

    Thomas G. Marshall wrote:
    > Andrew Thompson coughed up:
    >
    >>On Wed, 13 Jul 2005 12:31:08 +0200, Xu wrote:
    >>
    >>>Andrew Thompson wrote:
    >>>
    >>>>On Wed, 13 Jul 2005 09:41:35 +0200, Xu wrote:
    >>>>
    >>>>
    >>>>>Hi i am wondering if there is a simple way to reduce a jcombobox
    >>>>>visual size

    >>
    >>..
    >>
    >>>>Sounds more like a Menu you are after. Or at least that
    >>>>is what the end user would probably prefer to a drop-down
    >>>>list that looks or behaves in a way that is 'unusual'..

    >>
    >>>..you can find them in firefox or in internet
    >>>explorer.(Back and Forward Button's).

    >>
    >>Aha! Good point. Yes.. I not only see the type
    >>of control you mean, but am so used to using it
    >>I barely notice it. This pretty much blows my theory
    >>of 'unusual' out of the water!
    >>
    >>I'll wait to see what the GUI experts here on..
    >>Wait a second.. You won't find the GUI experts here!
    >>These c.l.j.programmers could not hack out a GUI if
    >>their life depended on it. [ ;-) ]

    >
    >
    > WHAT!!!???!!!!!
    >
    > {author thumbs through ebay for a sniper rifle...}
    >
    >
    >
    >>I suggest you
    >>a) put this question to comp.lang.java.gui
    >>b) mention you had your time wasted by a c.l.j.programmer
    >>(more to warn of/explain the multi-post)
    >>c) Mention the FF/IE back button.
    >>(A picture paints a thousand words!)
    >>
    >>HTH

    >
    >
    >
    >

    Can i borrow your sniper rifle? :p
     
    Xu, Jul 14, 2005
    #8
  9. On Thu, 14 Jul 2005 03:42:18 GMT, Thomas G. Marshall wrote:
    > Andrew Thompson coughed up:

    ....
    >> These c.l.j.programmers could not hack out a GUI if
    >> their life depended on it. [ ;-) ]

    >
    > WHAT!!!???!!!!!
    >
    > {author thumbs through ebay for a sniper rifle...}


    LOL! I must have said that at least two to thirty times on
    separate threads hoping c.l.j.p.ers would get a chuckle[1] from it.

    NOW they notice! SheEEesh...

    [1] Other people (apparently) don't find it as funny as I do..

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    Transmitido en Martian en SAP
     
    Andrew Thompson, Jul 14, 2005
    #9
  10. Xu

    Xu Guest

    Andrew Thompson wrote:
    > On Thu, 14 Jul 2005 03:42:18 GMT, Thomas G. Marshall wrote:
    >
    >>Andrew Thompson coughed up:

    >
    > ...
    >
    >>>These c.l.j.programmers could not hack out a GUI if
    >>>their life depended on it. [ ;-) ]

    >>
    >>WHAT!!!???!!!!!
    >>
    >>{author thumbs through ebay for a sniper rifle...}

    >
    >
    > LOL! I must have said that at least two to thirty times on
    > separate threads hoping c.l.j.p.ers would get a chuckle[1] from it.
    >
    > NOW they notice! SheEEesh...
    >
    > [1] Other people (apparently) don't find it as funny as I do..
    >

    Different people.. different humor.
     
    Xu, Jul 15, 2005
    #10
  11. Xu coughed up:
    > Andrew Thompson wrote:
    >> On Thu, 14 Jul 2005 03:42:18 GMT, Thomas G. Marshall wrote:
    >>
    >>> Andrew Thompson coughed up:

    >>
    >> ...
    >>
    >>>> These c.l.j.programmers could not hack out a GUI if
    >>>> their life depended on it. [ ;-) ]
    >>>
    >>> WHAT!!!???!!!!!
    >>>
    >>> {author thumbs through ebay for a sniper rifle...}

    >>
    >>
    >> LOL! I must have said that at least two to thirty times on
    >> separate threads hoping c.l.j.p.ers would get a chuckle[1] from it.
    >>
    >> NOW they notice! SheEEesh...
    >>
    >> [1] Other people (apparently) don't find it as funny as I do..
    >>

    > Different people.. different humor.


    Yes, besides, I have to be careful with /my/ particular brand of humor. If
    Andrew Thompson fails to show up for work in the next few days, the
    police'll be at my door. /And/ if I were a murdering psychopath, I'd look
    through usenet looking for statements like mine in the hopes of finding
    someone to frame. Actually, if Andrew was feeling particularly evil, he
    could fake his own death. Ah well.



    --
    http://www.allexperts.com is a nifty way to get an answer to just about
    /anything/.
     
    Thomas G. Marshall, Jul 15, 2005
    #11
  12. On Fri, 15 Jul 2005 15:10:00 GMT, Thomas G. Marshall wrote:

    > Actually, if Andrew was feeling particularly evil, he
    > could fake his own death.


    I was about to make a 'flip' response to this referring back
    to a post that I made in reply to one of yours, where *I*
    mentioned a 'rifle'. Eerily I can 'find' the post in the
    thread list at groups beta, but cannot seem to bring it up
    on-screen.

    <http://groups.google.com.au/group/comp.lang.java.programmer/tree/browse_frm/thread/172837b7b0667fd1/2e93a06df9d35c48?rnum=71&hl=en&q=%22rifle%22+group:comp.lang.java*+author:andrew+author:thompson&_done=%2Fgroup%2Fcomp.lang.java.programmer%2Fbrowse_frm%2Fthread%2F172837b7b0667fd1%2F35aff8c46fdb4b64%3Fq%3D%22rifle%22+group:comp.lang.java*+author:andrew+author:thompson%26rnum%3D2%26hl%3Den%26#doc_35aff8c46fdb4b64>

    <spooky music>
    It looks like the framing is proceeding well, but it
    is not *ME* doing it.
    </spooky music>

    [ throws suspicious glance at a major search engine..

    shHHHhh, it will *hear* you. ]

    On a more serious (or factual) note, I was wonderring where
    40% of my posts 'disapeared to' mid last year when groups
    beta started. This post is the first actual evidence I have
    that some of my posts are effectively unreachable through
    the web inteface.

    --
    Andrew Thompson
    physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
    Or Is It?
     
    Andrew Thompson, Jul 16, 2005
    #12
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeffrey

    Fix the width of a dropdown list?

    Jeffrey, Dec 22, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    729
    Hermit Dave
    Dec 22, 2003
  2. AndrewF
    Replies:
    1
    Views:
    817
    Bruce Barker
    Oct 10, 2005
  3. Ramon F Herrera

    JComboBox with dynamic list?

    Ramon F Herrera, Dec 27, 2005, in forum: Java
    Replies:
    5
    Views:
    29,116
  4. rum23

    asp:dropdown list width

    rum23, Nov 24, 2008, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    1,507
    Brian Kenneth Nielsen
    Nov 25, 2008
  5. Replies:
    1
    Views:
    344
Loading...

Share This Page