Computer Science Canada

Making Battle Ship

Author:  BlAcK TuRtLe [ Sat Jan 10, 2004 7:04 pm ]
Post subject:  Making Battle Ship

For my final program i'm doing battleship and i made this topic to post all my questions.
So, here's my first question. How do u adjust the screen size of the application??

Author:  santabruzer [ Sat Jan 10, 2004 7:25 pm ]
Post subject: 

directly from help:
setscreen ( "graphics:400;300" ) % Change window to 400x300
....
enjoy

Author:  Andy [ Sat Jan 10, 2004 8:14 pm ]
Post subject: 

uhhhh wtf? isnt that turing?

Author:  BlAcK TuRtLe [ Sat Jan 10, 2004 8:21 pm ]
Post subject: 

umm ... din't work. Sad

Author:  Andy [ Sat Jan 10, 2004 8:27 pm ]
Post subject: 

of course not thats turing

Author:  BlAcK TuRtLe [ Sat Jan 10, 2004 8:38 pm ]
Post subject: 

Any idea how to set the screen size in JAVA!!!

Author:  Andy [ Sat Jan 10, 2004 9:17 pm ]
Post subject: 

pm the java mod

Author:  Dan [ Sat Jan 10, 2004 10:07 pm ]
Post subject: 

i think it depends on how you are doing graficks, if it is an applet it can be chaged in the html to load it.

Author:  rizzix [ Sat Jan 10, 2004 10:47 pm ]
Post subject: 

All components inherit the public void setBounds(int x, int y, int width, int height); method

use it to (re)position the top left corner of the component and change the width & height as well.

or u can just use the public void setSize(Dimension d); method (which is also inherited by all components)

PS: take a look at the example in [Tutorial] SWING -- The Basics

Author:  Dan [ Sat Jan 10, 2004 11:13 pm ]
Post subject: 

thats why you the java mod rizzix Razz


: