Results 1 to 2 of 2

Thread: shorten code

  1. #1
    Hypenate is offline Member
    Join Date
    Jan 2008
    Rep Power

    Post shorten code

    The java-course has started at school, so I'm new to this...
    Java Code:
       JFrame frame = new VB0210();
        	frame.setTitle ("Oefening 10");
        	frame.setContentPane (paneel);
        	frame.setVisible (true);
    I just wonderd if this code could be shorted, in VB.NET we could use:

    Java Code:
    with openfiledialog
    .filter "TekstFile *.txt|.txt"
    .index = 1
    end with
    instead of always typing openfiledialog.filter or openfiledialog.index so I wonderd if there was also a method with java for doing this like
    Java Code:
     with frame
    .setTitle ("Oefening 10");
    end with
    Greetings :cool:
    Last edited by Hypenate; 01-29-2008 at 05:51 PM.

  2. #2
    tim's Avatar
    tim is offline Senior Member
    Join Date
    Dec 2007
    Rep Power

    Default Not in books

    Hello Hypenate

    I have never seen this short hand notation in any Java books or Java websites. I am also interested if this is possible, but I don't think so. :p
    Eyes dwelling into the past are blind to what lies in the future. Step carefully.

Similar Threads

  1. I need help fixing my code.. or non code?
    By MrHuggykins in forum New To Java
    Replies: 1
    Last Post: 03-19-2008, 10:12 PM
  2. Pls some one to help mi wit this code
    By _nik_ in forum New To Java
    Replies: 3
    Last Post: 02-10-2008, 02:02 AM
  3. code help
    By chitwood in forum New To Java
    Replies: 0
    Last Post: 02-10-2008, 12:08 AM
  4. tic tac toe code
    By zoe in forum New To Java
    Replies: 1
    Last Post: 07-23-2007, 04:36 PM
  5. Replies: 1
    Last Post: 04-26-2007, 03:52 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