Results 1 to 3 of 3
  1. #1
    coffeeJava is offline Member
    Join Date
    Nov 2011
    Posts
    4
    Rep Power
    0

    Question Enumerating command-line output in a JComboBox

    I working on a small project in wich i execute a command line: gphoto2 --get-config iso
    As result i get:

    Label: ISO Speed
    Type: RADIO
    Current: 200
    Choice: 0 100
    Choice: 1 200
    Choice: 2 400
    Choice: 3 800
    Choice: 4 1600
    Choice: 5 3200


    now I want to, the values in a combobox based on the number of lines and their values.
    But I dont know quite how :)

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

    Default Re: Enumerating command-line output in a JComboBox

    Some questions:
    • Is this a Swing application, and are you trying to create a JComboBox with this information?
    • What have you tried? What isn't working? and Where specifically are you stuck?
    • Will you be needing to call a native application from within Java, capture its output stream and then use the information obtained from within your Java program in its JComboBox?


    The more useful information that you can tell us, the better we'll be able to help you.

    Best of luck.

  3. #3
    coffeeJava is offline Member
    Join Date
    Nov 2011
    Posts
    4
    Rep Power
    0

    Default Re: Enumerating command-line output in a JComboBox

    Yes it is a swing app.
    I know how to create a JComboBox but what I want is that some kind of void that looks how many "Choice" lines have been outputted and each value of that Choice line like: 100 must be put in the combobox.

Similar Threads

  1. Replies: 16
    Last Post: 09-17-2011, 03:41 AM
  2. Order whilst Enumerating
    By Ciwan in forum New To Java
    Replies: 7
    Last Post: 06-26-2011, 04:15 PM
  3. can i run line by line command in netbean?
    By choconlongxu in forum NetBeans
    Replies: 1
    Last Post: 07-19-2010, 09:41 PM
  4. Replies: 2
    Last Post: 07-02-2010, 03:20 PM
  5. Unable to execute command line command in java
    By LordSM in forum New To Java
    Replies: 1
    Last Post: 08-08-2007, 01:23 AM

Tags for this Thread

Posting Permissions

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