Results 1 to 7 of 7

Thread: Java swing/awt/listeners question

  1. #1
    Admiral Memo's Avatar
    Join Date
    Apr 2001
    Location
    East Village
    Posts
    5,659

    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

  2. #2
    Rear Admiral Lower Half Cubsfan's Avatar
    Join Date
    Jul 2001
    Location
    Colorado
    Posts
    2,743
    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.

  3. #3
    Captain _=DeltaForce=_'s Avatar
    Join Date
    Jul 2004
    Location
    Planet Mars
    Posts
    1,699
    I also need help with Java, I want to convert a number to Hexadecimal... I am a newbie.. Little Help would be appreciated

  4. #4
    Rear Admiral Lower Half SnowSurfer's Avatar
    Join Date
    Jun 2002
    Posts
    2,616
    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
    I have an athlon xp 2500+ ... aren't you glad you know that?

  5. #5
    Admiral Memo's Avatar
    Join Date
    Apr 2001
    Location
    East Village
    Posts
    5,659
    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!

  6. #6
    Rear Admiral Lower Half Cubsfan's Avatar
    Join Date
    Jul 2001
    Location
    Colorado
    Posts
    2,743
    Quote Originally Posted by 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!
    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.

  7. #7
    Rear Admiral Lower Half Cubsfan's Avatar
    Join Date
    Jul 2001
    Location
    Colorado
    Posts
    2,743
    Quote Originally Posted by _=DeltaForce=_
    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/...g/Integer.html

    There's a lot of useful functions in that.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •