Solved

My Color Chooser

Posted on 2003-12-03
5
1,030 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
[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
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
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 basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to implement Singleton Design Pattern in Java.

726 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