Shawn Rieger

Greenhorn
+ Follow
since Sep 05, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Shawn Rieger

ok thank you soo much. with a little modification i got it to work by looping through each char and checking to see if it matches my charater set.



I only have a few questions. what is "int offs, and AttributeSet a" for? In your original example code it doesn't proccess or use them at all. Do we need them in there?
[ September 10, 2005: Message edited by: Shawn Rieger ]
18 years ago
Why does this work for all integers but not the "-" (negative sign)?
I can type it in at runtime, but if i try to set it... String.setText("-1"); It doesn't allow it and I get an error.


[ September 09, 2005: Message edited by: Shawn Rieger ]
18 years ago
I've read the sun tutorials on JFormattedTextField but i just can't get it. All I want is a text field that only allows positive integer, and no limit on length. Can someone help me out and just just tell me to look at sun's tutorial.. cause thats not helping me, just making me more confused. Thanks in advance!
18 years ago
I'm not sure i follow your question but.. If your trying to return a specific element in an array...

18 years ago
I have a panel, in it a few components. I've gotten the components inside the panel to line up just how I want them. But when I add the panel to the frame at location 0,0 (Should be Top Left) its still centered vertically on the frame. Why is this? I just want my components to start out in the top left hand corner of my frame and span out from there. How can I do this. My code is below...

18 years ago
Yes, but with GridLayout I can't strech coponent across 2 or more cells can I?
18 years ago
I can't get the controls to fill out properly. This is what Im going for...



for some reason it fills the controls out as if there were only 3 columns? I don't understand. Even when I make the label occupy col 1 and 2 it does the same thing. AAm I missing something here?



[ September 08, 2005: Message edited by: Shawn Rieger ]

[ September 08, 2005: Message edited by: Shawn Rieger ]

[ September 08, 2005: Message edited by: Shawn Rieger ]
[ September 08, 2005: Message edited by: Shawn Rieger ]
18 years ago
hmm... Well this is the actual code. Maybe i have it in the wrong spot cause im still getting errors.


[ September 07, 2005: Message edited by: Shawn Rieger ]
18 years ago
Anyone have any idea why this doesn't work? I keep getting "<identifier> expected"

18 years ago
How can I lock a JTextField so that it wont accept user input and at the same time it can't be grayed out if disabled. If this is not possible I can use a JLabel but I need a border and am not sure how do this. I'm using gridbaglayout. Any ideas?
18 years ago
My confusion in in the addComp() function...

addComp(jlbl1, container, gbConst, 0, 0, 2, 1, 5, 1);

What are the last 6 parameters? Im assuming the first 2 ("0, 0,") are row and column. But when I add jlbl3 at ("1, 1") the label ends up at the top row right next to the first label. Im confused. And what are the rest of the parameters?

Any help out there?

18 years ago
Ahh that was it. Can you tell me what the difference is? Becase my book's example uses JApplet, which obviously doesn't work.
18 years ago
ok, thanks for that. I always forget Java is so strict when it comes to case. I'm too use to VB lol. So I figured out all my problems in the above post, but have now ran into a new one. I created another class to call the layout but when I run it, nothing happens. No errors, no frame. I'm following this book I have exaclty and still can figure it out. Any ideas?

18 years ago