Results 1 to 3 of 3
  1. #1
    lenlen006 is offline Member
    Join Date
    Dec 2012
    Rep Power

    Default New Coder here. Trying to output string to a text box

    I'm finishing my first course in programming, so this is more advanced that I can handle.

    I coded a simple program to take the input string generated by a barcode scanner to extract a few digits and modify them to a new string.
    What I'd like to do is output the string, not to a file or the console, but to a text box in another executable already running; though this is too advanced for me right now.

    Is this possible to do?
    Here is my code:

    public static void main(String[] args)

    String barc0de, step1;
    step1 = "1.2";
    Scanner kb = new Scanner(;
    System.out.println("Scan your barcode now:");
    barc0de = kb.nextLine();

    char[] bcArray = barc0de.toCharArray();

    step1 = step1 + bcArray[5] + bcArray[6] + bcArray[7];

    Last edited by lenlen006; 12-10-2012 at 04:09 AM.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: New Coder here. Trying to output string to a text box

    Please go through and BB Code List - Java Programming Forum and edit your post accordingly.

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Rep Power

    Default Re: New Coder here. Trying to output string to a text box

    It is possible - but it's pretty hacky. You can use Java's Robot class to select your other window and type the code into the box. Some operating systems have scriptable UIs (like applescript) and that could help if you are using a mac. Otherwise, the Robot class is all I can think of.

Similar Threads

  1. Java Coder Needed
    By nvts in forum Jobs Offered
    Replies: 0
    Last Post: 05-03-2010, 11:49 PM
  2. Hiring a JAVA coder...
    By Kryptix in forum Jobs Offered
    Replies: 1
    Last Post: 10-31-2009, 03:47 AM
  3. freelance java coder needed
    By asse in forum Jobs Offered
    Replies: 2
    Last Post: 08-11-2009, 03:47 PM
  4. Java, output string, getting correct output? HELP!
    By computerboyo in forum New To Java
    Replies: 2
    Last Post: 02-25-2009, 11:44 PM

Posting Permissions

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