473,400 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

Draw different shapes of different colours and positions within applet

1
Dear all,

I need help in creating this system really got tired by searching. I am new baby born programmer (^_^).

The requirments are:

Develop a Java applet that draws different shapes of different colours and different positions within the applet. Using combo-boxes the user should be able to specify the shape and colour; to specify position (relative to the origin of the applet panel) text fields can be used. As well, the user should be able to clear the display area.

Yours Faithful,

(^_^)
Apr 3 '08 #1
3 3685
acoder
16,027 Expert Mod 8TB
The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.

Please read the Posting Guidelines and particularly the Coursework Posting Guidelines.

Then when you are ready post a new question in this thread.

---

Please remember to provide a meaningful Title for any threads started (see the FAQ entry Use a Good Thread Title).

This helps to ensure that other members, and also the general public, will have a better chance of finding answers to any similar questions.

MODERATOR
Apr 3 '08 #2
BigDaddyLH
1,216 Expert 1GB
Why not take the 2D API tutorial?

http://java.sun.com/docs/books/tutorial/2d/index.html
Apr 3 '08 #3
NitinSawant
270 100+
Use paint method of applet class,
Expand|Select|Wrap|Line Numbers
  1. public void paint(Graphics g)
  2. {
  3.         g.drawLine(0,0,300,300);
  4.         //paste Drawing different shapes code here
  5.         //object g has many methods for painting and creating shapes
  6. }
  7.  
Apr 4 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: R | last post by:
Hello everybody! I'm newbie to JavaScript and I have a basic question. I have X and Y coordinates of A and B points. How can I draw a line connecting A and B? thanks in advance cheers
3
by: Colin McGuire | last post by:
Hi there. I have written a small procedure to draw various shapes on things. A bit of it is shown below. Private Sub drawShape(ByVal shapeType As Integer, ByRef g As Graphics) Select Case...
2
by: Agnes | last post by:
in vb.net , any tools can draw a line the the form ?? or rectangle box ? Thanks Form Agnes
3
by: Daniel Mark | last post by:
Hello all: I want to draw some shapes, such as lines, circles on an image. The input to the program is an image and the output from the program is a superimposed image. what kind of...
5
by: sunil borwankar | last post by:
I am trying hard to make Custom Command Buttons of Irregular Shape and of Different colours in Active X Interface Wizard but am not successful. Irregular Shape Buttons i.e.; Triangular, Arrow Shape...
2
by: SrideviMani | last post by:
Hi, I just want to draw primitive shapes like lines,circles,rectangles etc. I found a method : Graphics.drawline(Pen,x1,y1,x2,y2) The code I used is as follows: Pen blackPen = gcnew Pen(...
0
by: alwayssmiling | last post by:
Hi, Im drawing some shapes on the image surface (i.e when im displaying the image ) with the help of graphics. Since i want to move thsese shapes from one place to other place in the...
5
by: taishin | last post by:
i need to create an applet with netbeans that draws shapes and once drawn can be moved with the mouse within the window. shapes are circle, rectangle, square, and a triangle. should create each of...
1
by: kummu4help | last post by:
hi, i want to draw rectangle based on mousedrag event. if user dragging the mouse, then the rectangle on the applet should increase or decrease basing on current mouse coordinates. i have the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.