Forum: Java Jun 5th, 2009 |
| Replies: 2 Views: 551 Excellent, thank you very much! |
Forum: Java Jun 5th, 2009 |
| Replies: 2 Views: 551 Hi guys,
I am using boolean variables as flags in a program and i want to be able to invert the value.
for example if the current value is true, then it must be changed to false; doesn't matter... |
Forum: Java Jun 2nd, 2009 |
| Replies: 3 Views: 557 Thanks very much poeticinsanity. I wasn't sure if it would work, but it does. Thank you. |
Forum: Java May 31st, 2009 |
| Replies: 3 Views: 557 Hi guys,
I want to paint multiple layers of images onto one image. I'm going to be using BufferedImage for this.
How would I go about painting these multiple images onto one (in essence... |
Forum: Java May 31st, 2009 |
| Replies: 3 Views: 487 so i should use multiple glass panes and then paint the various layers to a specific glasspane? |
Forum: Java May 31st, 2009 |
| Replies: 3 Views: 487 Hey guys
I'm using JLayeredPane because i want three distinct layers in my program. terrain, buildings and then characters.
I thought that JLayeredPane was easily the best choice for this... |
Forum: Java May 24th, 2009 |
| Replies: 1 Views: 203 Hi guys
I want to take an image and cut it into blocks, then store each block in an array of bufferedimages.
I have tried many things
public void splitImage(int cols, int rows)
{
... |
Forum: Java Mar 9th, 2009 |
| Replies: 1 Views: 367 Hi, i'm making a class which runs on a different thread to the main class. I want this thread class to listen for keyboard events and then I will have specific action from there.
The thing is, I... |
Forum: Java Mar 9th, 2009 |
| Replies: 5 Views: 271 Ta DAHH! I get 500 every time. Thanks a lot, I was leaving room for error in my original code, but when it returned differences below what i was sleeping the thread for, i got worried.
Thanks a... |
Forum: Java Mar 9th, 2009 |
| Replies: 5 Views: 271 I threw together a quick program to test if sleep works
and the difference between the 2 values was either 16 or 31 (give or take one or two milliseconds) and as far as I'm concerned this... |
Forum: Java Mar 9th, 2009 |
| Replies: 5 Views: 271 Oh, my bad. It was more of an example.
But basically, can you make a thread sleep even if you haven't declared a Thread anywhere.
For example Thread.sleep(20); |
Forum: Java Mar 9th, 2009 |
| Replies: 5 Views: 271 I was wondering do all programs have a unnamed thread by default?
For example, if i have a very basic program, can i put Thread.sleep(int) anywhere in it and it will make the program sleep for a... |
Forum: Java Mar 7th, 2009 |
| Replies: 1 Views: 249 Hi
I am having problems with BufferedImage. What i would like to do is create a bufferedimage from an image stored on the hard disk. For example, i create a new file pointing to this image file.... |
Forum: Java Mar 2nd, 2009 |
| Replies: 3 Views: 473 If nobody is replying because I haven't tried, i have. I just don't have any idea how to do it |
Forum: Java Mar 2nd, 2009 |
| Replies: 3 Views: 473 Hi, I just wanted to ask for some help considering images.
What I would like to do is take an image and then split it up into blocks of a certain dimension (say, 20x20). Then I would like to put... |
Forum: Java Oct 5th, 2008 |
| Replies: 11 Views: 962 Ok cool, thanks very much. |
Forum: Java Oct 5th, 2008 |
| Replies: 11 Views: 962 Well firstly, does the method I listed work? |
Forum: Java Oct 5th, 2008 |
| Replies: 11 Views: 962 Thanks,
Another question about arrays is whether I can take all the values from one array and put them in another one. In the same order obviously.
So can I say
Is there another way to do... |
Forum: Java Oct 5th, 2008 |
| Replies: 18 Views: 1,088 Thanks alot, 5 is the max number anyway, thats why I chose it originally.
Thanks very much |
Forum: Java Oct 5th, 2008 |
| Replies: 18 Views: 1,088 Ok, i've managed to get it working by referencing it with globalVariable.variable_in_question
For some reason i had to set the variables in globalVariables to static. Anyone care to explain this? |
Forum: Java Oct 5th, 2008 |
| Replies: 18 Views: 1,088 I create an object of the type globalVariables, this has the variables needed in it.
When I create the object in one of my methods (in another class) i get an error saying that it can't find the... |
Forum: Java Oct 5th, 2008 |
| Replies: 18 Views: 1,088 Yeah, thanks.
I have already started doing this. I just thought that there was perhaps a keyword or statement for this or something.
Thanks for the help! |
Forum: Java Oct 5th, 2008 |
| Replies: 18 Views: 1,088 Thanks, will read through that. Another problem, which i have checked the internet for, is a global variable.
I have a couple of class files which are their own JFrames; I have a variable called... |
Forum: Java Oct 5th, 2008 |
| Replies: 11 Views: 962 Hi
I'd like to use an array to store values of particular things. I would like names to correspond to each value in the array. What I was thinking was, should I perhaps create 2 arrays: String[]... |
Forum: Java Oct 4th, 2008 |
| Replies: 18 Views: 1,088 I collect my data from JTextFields.
Im using a JFrame. |
Forum: Java Oct 4th, 2008 |
| Replies: 9 Views: 2,073 LOL nice,
I thought you were going to ask wtf I was talking about.
:) |
Forum: Java Oct 4th, 2008 |
| Replies: 18 Views: 1,088 I'l rather cut my losses on the incrementing value field thing.
But, what I need to ask is how I would go about creating something dynamic.
I have 3 text fields, I want the values you put into... |
Forum: Java Oct 4th, 2008 |
| Replies: 18 Views: 1,088 Oh.....
Hmm, how should I go about that?
So there is no java equivalent? |
Forum: Java Oct 4th, 2008 |
| Replies: 9 Views: 2,073 Publilius Syrus
(~100 BC)
Maybe? |
Forum: Java Oct 4th, 2008 |
| Replies: 18 Views: 1,088 No, it isn't that. its one of those things where there are numbers and pressing the arrow up on the side, increases the value by one inside. |
Forum: Java Oct 4th, 2008 |
| Replies: 2 Views: 489 well, im not sure, but your code says
and you declared income as a double.
And provincial also relies on income for its value, so thats why it doesn't work. |
Forum: Java Oct 4th, 2008 |
| Replies: 18 Views: 1,088 Hi again
What is the name of the component in programs where there is:
a 2 character text field and on the side there are up and down arrows to increase or decrease the value in the text field.... |
Forum: Java Oct 4th, 2008 |
| Replies: 9 Views: 2,073 Ok, thanks very much.
And thanks for helping with my petty questions.
Thread solved. |
Forum: Java Oct 4th, 2008 |
| Replies: 9 Views: 2,073 Thanks so very much, I keep on making these stupid errors.
Just on the side, is there any way to edit the title of the showMessageDialog? and possibly the icon?
Thanks again.
EDIT: Are the... |
Forum: Java Oct 4th, 2008 |
| Replies: 9 Views: 2,073 Hi guys
I can't seem to get a new line in a JOptionPane.showMessageDialog(null, " "); statement. I try the /n command, but it still doesn't seem to work.
Is there any way I can get a paragraph... |
Forum: Java Oct 3rd, 2008 |
| Replies: 2 Views: 3,432 Thanks very much man, I never would have found such an annoying error.
Thanks! |
Forum: Java Oct 3rd, 2008 |
| Replies: 2 Views: 3,432 Hi guys
I am trying to build a program which scans data from a text file, but I keep getting an error when trying to compile it.
The code
import javax.swing.*;
import java.awt.*;
import... |
Forum: Java Jun 30th, 2008 |
| Replies: 1 Views: 410 Well, add a method in the program which runs a batch file which can then compile for you.
nobody is going to do this for you, don't demand us to do the project. |
Forum: Java Jun 30th, 2008 |
| Replies: 3 Views: 1,115 The else provides a fallback condition. Just a single if is there for one condition only.
for example, if you put just an if in the code, it goes through one condition then continues with the... |
Forum: Game Development Jun 29th, 2008 |
| Replies: 2 Views: 737 Hi, do any of you know any good resources for (2d) game development in java? I want to build a game but need a good tutorial/resource for such a thing. Can you help? |