Thanks, copying everthing into a new project worked. Not very practical but at least I can use the debugger now.
Type: Posts; User: Harry Blargle
Thanks, copying everthing into a new project worked. Not very practical but at least I can use the debugger now.
I don't normally use eclipse, but I wanted to use it to debug my code. I have an existing program that runs fine from the commandline but when I try to run it from eclipse it all I get is errors...
In the code posted in the first post, you also misspelled your last name in the part where you open the file, Sotres instead of Satres. That's where the error opening file comes from most likely.
'tokens' is an array, not a number so you can't compare it as one, arrays do have a public field called length to indicate how many values are in it, so if(tokens.length > 4) would work.
while(hours >= 1)
...
hours++
Look at that bit of code and think about it some more.
You already check the input, just add another check.
If the hexadecimal number is a string you could use the index of each character for your math and as you loop over all the characters you can use a switch statement with 16 cases so you never have to...
setPreferredSize doesn't do anything here, setMaximumSize does work. I'm still confused why the first example does work though, since I can't see any real difference between the two examples.
I have a weird problem with laying out some JTextFields.
This code works right:
JPanel setbuttonpanel = new JPanel();
setbuttonpanel.setLayout( new...
I see, I had no idea that mattered, but that explains it. It does indeed work now.
I know, I forgot to uncomment the line before i copy-pasted the code into my post. (it's right below panel = new CustomPanel(); on line 17)
I'm trying to layout a JPanel with a button and a scrollable textarea so that the button is at the top and the textarea takes up all the available remaining space. From what I read borderlayout...
google "java actionlistener", it's the first result
With the while loop on the EDT it blocks that whole thread preventing updating and it worked before because they were seperate threads then, right?
package Test;
import java.awt.*;
import javax.swing.*;
import java.awt.geom.*;
import java.awt.event.*;
import javax.swing.event.*;
public class TestWindow
{
I have a weird problem with my gui. I read on the internet that you should use invokeLater to start swing stuff so I thought I'd give it a try. But when in run the gui with it, it just shows a blank...
--- Update ---
Okay, I just found what's causing the problem. The actual program also implements ActionListener and that's stopping the keybind from working. I need the actionlistener for several...
I'm trying to make a global hotkey in my program so that when i press 'l' anywhere it pops up a jdialog. I've tried a keylistener and that works as it should untill i click any button at which point...
Well, I found the first problem thanks to the SSCCE, I forgot to reset the basicStroke before drawing the slider. The other problem is still there though, if you drag the thumb all the way down it...
I'm trying to modify the look of a JSlider and so far I've managed to do what I want, but 2 problems remain.
- When I get anywhere near it with the mouse, the slider get's highlighted. I want to...
Ah, so obvious now that you pointed it out, thanks.
I'm trying to make a Game of Life program but something isn't working right. I have a play/pause button but after it is pressed the main loop keeps going for several iterations before it stops. The...
Thanks, but that's not quite what I want. I intend for the file to have a few million numbers in it so reading and overwriting everything every time would take a bit long. What I'm looking for should...
I have a file with a lot of numbers in it and I want to read the numbers from the file one by one, test them and then either leave them or delete them from the file. What I/O stream would be good for...
bleh, thanks anyway