Solved

My Color Chooser

Posted on 2003-12-03
5
999 Views
Last Modified: 2010-05-18
I have been trying to teach myself java.  I have been using the Deitel & Deitel book Java How to Program, 5th Edition.  Does anyone know where I can find the solutions to the problems at the end of the chapters?  I wish I could look at the finished examples.  Anyway, I have been trying to do problem 14.12 and need to know how to do it.  Here is the question:

Declare a subclass of JPanel called MyColorChooser that provides three JSlider objects and three JTextField objects.  Each JSlider represents the values from 0-255 for the red, green and blue parts of a color.  Use the red, green and blue values as the arguments to the Color constructor to create a new Color object.  Display the current value of each JSlider, the JTextField should be changed accordingly.  Declare class MyColorChooser so it can be reused in other applications or applets.  Use your new GUI component as part of an applet that displays the current Color value by drawing a filled rectangle.
0
Comment
Question by:brassmon
  • 2
  • 2
5 Comments
 
LVL 15

Assisted Solution

by:Javatm
Javatm earned 150 total points
ID: 9870745
Friend;

You might need to work for that on your own then. Anyways Im also using a Deitel & Deitel book
Java How to Program but I'm using the 3rd edition which is also good.

Here are some sites which can help you :

For Color Chooser :
http://java.sun.com/docs/books/tutorial/uiswing/components/colorchooser.html

For JSlider :
http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-JSlider.html

For JTextField :
http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html

This old questions in EE will help you :

http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_11970879.html
http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_20449365.html

Hope it helps . . .
Javatm

0
 
LVL 15

Expert Comment

by:Javatm
ID: 9870758
If you find it hard to do the old questions on EE can help you
with that just follow the links, thank you.

Javatm
0
 
LVL 15

Accepted Solution

by:
jimmack earned 200 total points
ID: 9870905
Considering the cost of the book, I think that this is probably a bit of a con, but it looks like the solutions are published in yet another book:

http://www.amazon.com/exec/obidos/tg/detail/-/013142579X/ref=pd_sim_books_2/104-9942625-3144764?v=glance&s=books
0
 
LVL 2

Assisted Solution

by:f_98
f_98 earned 150 total points
ID: 9873421
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9891589
;-)
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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 if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

786 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