Solved

need help w/ JFrame and class Graphics2d

Posted on 2006-10-25
1
349 Views
Last Modified: 2008-03-03
I need some help with this assignment, this is a beggining java course im taking online, I just need help setting up the classes, since this is homeowrk you can point me to a good tutorial, or just psuedo code to get me started thanks for the help !


Write a JFrame application that simulates a screen saver. The application should displays randomly generated triangles, draws characters, and draw lines. After drawing 100 of them, the application should clear itself and start drawing lines again. To allow the program to draw continuously, place a call to repaint as the last line in method paint.

Each triangle should be filled with a different color. Use class GeneralPath and method fill of class Graphics2D to draw the triangles in different colors and different sizes.

The characters will be generated are A to Z , 26 characters, and 0 to 9, 10 number-digits. The characters will be draw in different font sizes and colors.

The drawing lines will use method drawLine of class Graphics to generate different lengths and colors.
0
Comment
Question by:dreaminbinary
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 14

Accepted Solution

by:
hoomanv earned 310 total points
ID: 17805215
Start learning the Java 2D API
http://java.sun.com/docs/books/tutorial/2d/index.html

A nice open-source demo of java 2d can be found in your jdk installation directory
jdk_home\demo\jfc\Java2D
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
servlet example 17 59
going to wrong jsp page 2 46
Java basic valueOf question 1 33
Strange router problem - can't access hotmail.com 14 38
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question