Search:

Type: Posts; User: Vic45

Search: Search took 0.22 seconds.

  1. How to use fields of a database in a java program?

    Hello. I guess I'm the only one who needs help with JDBC here! Anyway, So I need to do a comparison in a java program. I am working with a database. How could I get a value from the database and use...
  2. Re: Backing up postgres database for use in java program eclipse

    No, I am working on a project with other people. So I need it to dump it so I can use with other versions possibly. I'm not too experienced with it so yes, that may be what I need. So does the dump...
  3. Backing up postgres database for use in java program eclipse

    Hello, so I have googled this and can't really get a straight answer that I understand. I have a postgres database. I have to export it or save it so I can use it with a java app I am developing....
  4. Re: Simple Login system - trying to set a jlabel

    OK, thank you. I still have a lot to learn. -_-
  5. Simple Login system - trying to set a jlabel

    --- Update ---

    [/COLOR]Nevermind. ugh. Thanks I see it it was in the wrong spot. Out of scope.
  6. Replies
    5
    Views
    1,249

    Re: Problem making a runnable .jar

    I think in an earlier program I was able to do it with this: jdbc:sqlite::resource:LibraryDB2.db (which is erroring now) unless I really did have the db there or something. Sorry, I have no idea what...
  7. Replies
    5
    Views
    1,249

    Re: Problem making a runnable .jar

    OK well, no the .jar and db were not in the same folder because I need it to be a stand alone application.

    The program compiles and generates the .jar fine with the "default" getConnection...
  8. Replies
    5
    Views
    1,249

    Problem making a runnable .jar

    Hello! I am having a problem. So I need to make my program a runnable .jar file. The problem is my SQLite database path.

    When I do this line of code the .jar program works fine, but only on my...
  9. Replies
    29
    Views
    1,560

    Re: Making a universal RGB Color in Swing

    I know it's not good practice but I am trying this code out:


    import java.awt.Color;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;

    import javax.swing.ButtonGroup;...
  10. Replies
    29
    Views
    1,560

    Re: Making a universal RGB Color in Swing

    Could I do a setColors getter/setter and set them all that way? Or is it better individually like setRed??
  11. Replies
    29
    Views
    1,560

    Re: Making a universal RGB Color in Swing

    I am trying to change them individually (not all three values at once) because I actually need them to get values from a JTextField. The radio buttons were just training wheels and I have failed. :( ...
  12. Replies
    29
    Views
    1,560

    Re: Making a universal RGB Color in Swing

    I'm having trouble with that then.



    public int getRed() {
    return COLOR_RED;
    }

    public void setRed(int red) {
    this.COLOR_RED = red;
  13. Replies
    29
    Views
    1,560

    Re: Making a universal RGB Color in Swing

    Ok, I see what you are saying. Within the "user interface" (The code with the radio buttons) I can put this for the red radio button:
    paintPanel.myColor = new Color(200, 0, 0); So I am really...
  14. Replies
    29
    Views
    1,560

    Re: Making a universal RGB Color in Swing

    OK, sure. I am trying to use setRed, setGreen and setBlue to set the corresponding values of COLOR_RED, COLOR_BLUE, COLOR_GREEN which controls the statement that sets the color for the rectangle,...
  15. Replies
    29
    Views
    1,560

    Re: Making a universal RGB Color in Swing

    Are you confused with what the program is trying to do?
    So I am trying to set COLOR_RED, COLOR_GREEN or COLOR_BLUE to any user-set value between 0 and 255. No they are not getting changed. Basically...
  16. Replies
    29
    Views
    1,560

    Re: Making a universal RGB Color in Swing

    Ok, here is the rest of it:

    (I will change the variable name c in my code, thanks)




    import java.awt.Color;
    import java.awt.Graphics;
  17. Replies
    29
    Views
    1,560

    Re: Making a universal RGB Color in Swing

    Ok:




    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import java.util.ArrayList;
  18. Replies
    29
    Views
    1,560

    Re: Making a universal RGB Color in Swing

    My idea is that whatever value (between 0 and 255) is input with either of the 3 categories of R,G, or B. So I need to set the RED to user defined, green and blue as well.

    When I try to use my...
  19. Replies
    29
    Views
    1,560

    Re: Making a universal RGB Color in Swing

    Ok, that makes more sense, thank you. What about changing the color? Am I calling the getters/setters or something incorrectly?
  20. Replies
    29
    Views
    1,560

    Re: Making a universal RGB Color in Swing

    I'm not getting errors now. I am trying to set the color from a different class than where this code is: (This situation confuses me often)

    I can set them manually, like below with green = 100 to...
  21. Replies
    29
    Views
    1,560

    Re: Making a universal RGB Color in Swing

    Ok, so your code verbatim worked. I was trying to use stuff like Color.c and getColor(c) It works fine with just c as the final argument. Thank you for that.

    One more problem - setting the...
  22. Replies
    29
    Views
    1,560

    Re: Making a universal RGB Color in Swing

    It was actually commented out. So I know I need something like this: Color c = new Color(255, 0, 0); for red, correct? But putting that into my code:
    drawingShape = new Rectangle(e.getX(),...
  23. Replies
    29
    Views
    1,560

    Making a universal RGB Color in Swing

    Hello. So I am making a small "paint" program in java as a GUI. I have most of it done but one thing is giving trouble. I need to be able to set an RGB value from one class to another. I have tried...
  24. Replies
    0
    Views
    1,744

    Introducing myself

    So I cant get my post around the first post URL thing. Sorry, but I am trying to post something and it doesnt have a URL but is still blocking me.

    And anyway - Nice to meet you all!
Results 1 to 24 of 24