Thread: Java: How to make "pull-down" button?

  1. #1
    unleashed alphaoide's Avatar
    Join Date
    Sep 2003
    Posts
    696

    Java: How to make "pull-down" button?

    Do any of you know how to make this sort of button (attached below) in Java? It's a button with an arrow next to it, which, when clicked on, offers other options. And I don't use GUI builder, so just don't tell me to drag and drop the appropriate control.

    Thanks.
    source: compsci textbooks, cboard.cprogramming.com, world wide web, common sense

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Your screen shot is of eclipse, which uses SWT. I don't know if Swing or AWT have the same widget or not. Anyway, in SWT you can control the style of the button by specifying the style in the constructor. Look at the constants in org.eclipse.swt.SWT.

  3. #3
    unleashed alphaoide's Avatar
    Join Date
    Sep 2003
    Posts
    696
    Oh, no. SWT is that powerful?! I couldn't get SWT to work so went with Swing instead. Oh well, is not really need anyway.

    Thanks, though.
    source: compsci textbooks, cboard.cprogramming.com, world wide web, common sense

  4. #4
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    If you couldn't get SWT to work its probably because you were'nt useing "-cp <stuff>;/path/to/swt.jar"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mats, the java answers
    By Jaqui in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 04-22-2008, 02:12 AM
  2. C++ and Java :: Breakdown
    By kuphryn in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 02-25-2004, 06:56 AM
  3. C/C++ Vs Java
    By Spectrum48k in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 10-21-2002, 09:06 PM
  4. Replies: 6
    Last Post: 04-20-2002, 06:35 PM
  5. Visual J#
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-08-2001, 02:41 PM