StewSupport
asked on
simple paint application in java
i'm trying to create an application that enables the user to paint a picture. The user should be able to choose the shape to draw, the color in which the shape should appear and whether the shape should be filled with color.
Use JRadioButton-s to select the type of a shape (which should be oval, or rectangle, or a line) and JCheckBox to determine if the shape should be filled with color.
Use JComboBox to choose the color of the shape. To determine location of the shape, implement the method mousePressed of the MouseAdapter to set the first corner of the shape and the method mouseReleased of the MouseAdapter to set the second corner of the shape (you can use methods abs and min of the class Math computing, respectively, absolute value to determine the width and the height of the shape, and minimum to determine the top corner point of the shape).
Use different frames for painting and tools (it is a MUST). Use panels as appropriate.
Use JRadioButton-s to select the type of a shape (which should be oval, or rectangle, or a line) and JCheckBox to determine if the shape should be filled with color.
Use JComboBox to choose the color of the shape. To determine location of the shape, implement the method mousePressed of the MouseAdapter to set the first corner of the shape and the method mouseReleased of the MouseAdapter to set the second corner of the shape (you can use methods abs and min of the class Math computing, respectively, absolute value to determine the width and the height of the shape, and minimum to determine the top corner point of the shape).
Use different frames for painting and tools (it is a MUST). Use panels as appropriate.
Have a look at the sample app that comes with the JDK
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
good