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...
Type: Posts; User: Vic45
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...
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...
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....
OK, thank you. I still have a lot to learn. -_-
--- Update ---
[/COLOR]Nevermind. ugh. Thanks I see it it was in the wrong spot. Out of scope.
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...
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...
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...
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;...
Could I do a setColors getter/setter and set them all that way? Or is it better individually like setRed??
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. :( ...
I'm having trouble with that then.
public int getRed() {
return COLOR_RED;
}
public void setRed(int red) {
this.COLOR_RED = red;
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...
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,...
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...
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;
Ok:
import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
import java.util.ArrayList;
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...
Ok, that makes more sense, thank you. What about changing the color? Am I calling the getters/setters or something incorrectly?
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...
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...
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(),...
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...
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!