Re: How to draw a simple line....




"TheBigPJ" <TheBigPJ@xxxxxxxxx> wrote in message
news:1180288012.845482.83500@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello again,

Ah nevermind, I decieded to try using the command line to run the code
and it worked :D

I guess that must have just been a BlueJ issue.

No, sounds like a version issue.

Arrays as arguments can be passed as (String... args) == (String[] args)
Just the former can be called as (myStr1, myStr2, my Str3) as opposed to
(String[] {myStr1, myStr2, my Str3}). So just a bit of syntactic sugar, as
they say.
The former is only availble from 1.5+

The other problem about the contentPane, is as I mentioned before. As of
version 1.4 they removed the need to explicity get the content pane to add
to, and did it behind the scenes in the JFrames add() method.

So both issues are version releated, so BlueJ is using a different version
than that on the command path.
I think you need to configure BlueJ a bit...


Now time to find out how to use keyboard input and update the graphics
on screen.


Are you following the Java Tutorials?
http://java.sun.com/docs/books/tutorial/index.html

--
Mike W


.



Relevant Pages

  • Re: Help on the necessary tools to start programming in Java
    ... BlueJ quickly demonstrated its lack of ability to work, ... but I'd still suggest using the command ... This added complication puts students off using cmd.exe. ...
    (comp.lang.java.programmer)
  • Re: Newbie Question: Which IDE Should I Start With
    ... > command line as the book suggests. ... > installed NetBeans with the Java download, and I downloaded BlueJ ... that you can focus on learning the language. ...
    (comp.lang.java.help)
  • Re: How to draw a simple line....
    ... Ah nevermind, I decieded to try using the command line to run the code ... I guess that must have just been a BlueJ issue. ... Now time to find out how to use keyboard input and update the graphics ...
    (comp.lang.java.gui)