View Full Version : Java swing/awt/listeners question
I was hoping someone could help me out with something simple in Java. I'm trying to create a paint program using java.awt & java.swing. I have this program loading up a jpg and creating a paint layer over it that I can draw on. I'm trying to implement an RGB color picker consisting of 3 sliders (Yes I know there is a built in color picker but I need to implement it with the 3 RGB sliders). I created a seperate class called color pick that contrains the 3 sliders and my main class is instantiating this. What I don't know is how to make the main file get the color from this other colorpick class. The drawing is using a class called myPrimitive which at the moment is just a rectangle and the color is passed in through there. My code is here:
http://www.dealdonkey.com/memo/cs354/project1
if anyone could help I'd greatly appreciate it!!!
TIA
Memo
Cubsfan
09-20-2004, 05:32 PM
How soon do you need this done by? I can take a look but I'm booked up for at least a couple of days.
_=DeltaForce=_
09-20-2004, 06:06 PM
I also need help with Java, I want to convert a number to Hexadecimal... I am a newbie.. Little Help would be appreciated
SnowSurfer
09-20-2004, 06:19 PM
java seems to be pretty hard for me at the moment too, maybe its because my teacher doesnt teach anything and he just gives us random programs. We have a program right now that needs stuff from chapter 5 in the book to work but it also needs stuff from 3 and 4, great. why cant he just go in....order!?!?!?
good luck with the coding memo
Graphics programming is really hard! I kinda did some po-drunk coding to get the color to work but now I have to implement a tinting brush which I have no idea how to do!
Cubsfan
09-21-2004, 08:42 AM
Graphics programming is really hard! I kinda did some po-drunk coding to get the color to work but now I have to implement a tinting brush which I have no idea how to do!
Do you know Java already, or are you just learning? If you're just learning, you might want to start with some command-line programming just to learn the language. If you're just learning, here's a good book: http://www.mindview.net/Books/TIJ/ You can actually download the whole thing from his website.
Cubsfan
09-21-2004, 02:12 PM
I also need help with Java, I want to convert a number to Hexadecimal... I am a newbie.. Little Help would be appreciated
Are you just trying to get a hex string? Take a look here:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Integer.html
There's a lot of useful functions in that.
Powered by vBulletin® Version 4.1.12 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.