0

can someone plz help
prog that allows the user to accept 2 end points (using mouse) and draws a rectangle between 2 points (using AWT Frame class and mouse listeners)

2.accepting two strings as comand line argumnts and append both.

3.a prog for accepting string from user.

i am a beginner both to java and this website so any suggestions.
very thankful to u pepl.this place rocks.

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by pyscho
0

can someone plz help
prog that allows the user to accept 2 end points (using mouse) and draws a rectangle between 2 points (using AWT Frame class and mouse listeners)

2.accepting two strings as comand line argumnts and append both.

3.a prog for accepting string from user.

i am a beginner both to java and this website so any suggestions.
very thankful to u pepl.this place rocks.

Need more details. What exactly are you having problems with? For #2, you'll have a main function:

public static void main (String args[])

and your job is to grab two elements from the args[] array, then use concat to turn two Strings into one String. For #3, you can set up a Scanner object to read in the input.

http://www.kodejava.org/examples/221.html

For #1, set up a Frame and a mouse listener, grab your two points in the mousePressed function, and from those two points, figure out the top left coordinate and the width and height of the Rectangle , then paint the Rectangle .

That should give you a start. Give it a try, take it as far as you can, then post some code and a specific question. These are three separate programs, presumably, so consider starting three separate threads.

0

Thanx for your help Vernon.i understood the third one and still working on 1 and 2.will get back to u soon.Thanx

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.