Win a copy of Rust Web Development this week in the Other Languages forum!

Tom Patrick

Ranch Hand
+ Follow
since Oct 24, 2000
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 Tom Patrick

Can anyone point me to a good website, book, or other source that will introduce a novice to the basics of EJB?
Thanks
I have a Point p and im trying to get a value from p.x and p.y, it seems I should be able to do this but I keep getting an error that I cant figure out:

This is the code I am using:


[This message has been edited by Tom Patrick (edited March 14, 2001).]
[This message has been edited by Tom Patrick (edited March 14, 2001).]
20 years ago
I want to create a window to pop up that tells a user an error has occured that looks like the ones that normally pop up in Windows (centered on screen, with an icon, single or up to 3 buttons such as "OK", "Cancel", "Yes", "No").
Is there a class that does this? Matching a windows Alert Dialog Box exactly is not required, but would be preferred.
Thanks
20 years ago
You can use the DecimalFormat class to do exactly that.
so if you had:
DecimalFormat binFormat = new DecimalFormat("00000000");
and then just did something like
int sumBinNum = 101;
System.out.println("The binary number: " + binFormat.format(sumBinNum));
then you will get "The binary number: 00000101"
[This message has been edited by Tom Patrick (edited March 07, 2001).]
20 years ago
I am working on an application where I have a frame with a menu bar. In a menu called File I have an open command that opens a file dialog box. This is how I coded it, I made a global object of the class and made it static so that I could pass that as the parent frame to the file dialog constructor. It just seems like it might not be the proper way to do it, any suggestions?
20 years ago
I wanted to see some examples of the use of the class FileChooserUI. Can anyone direct me to a good place that has examples of classes like that or show me an example? I wanted to see what you can do with the class so any basic info will be a great help!
20 years ago
I saw the following code in an example I was looking at:

I dont often see a call to a method like class.somemethod.somemethod. What is this saying in plain english? What cases would you use this in? Is it just for a Process object? Would you ever see class.somemethod.somemethod.somemethod...?
20 years ago
Thank you that worked perfectly
20 years ago
In VB there was a parameter you could set for a Text Area so that when you were typing in it once you reached the end if would wrap to the next line. Exactly like what happens when you are typing in a post on this board. How can you do the same with Java's text box?
20 years ago
can you dynamically change the size of an array?
For example if you create an array and store 5 values in it, and then want to add 3 more values... can you do that?
20 years ago
*smacks forehead*
That makes sense!!!
Ugh, been in front of the computer to long today ;-)
Thanks!
20 years ago
I know how to convert a StringBuffer into a String, but how do I do the reverse process?
20 years ago
As an addendum here is what I ended up doing... is there a simpler way of doing it?
20 years ago
I am working with wrapper classes, specifically the Character wrapper. I want to put a char into it and then convert it to upper case. Now it seems to me that I have to create a character object with a char to initilize it, and then I have to use the .toUpperCase method with another char (assume the same one) to make it upper case. This doesnt make any sense to me. With a string there is a parameterless .toUpperCase method. Why not for Character? The following is the code I am using:

20 years ago
I have an application I have written. It is a simple program that has 4 classes that I have written into a single .java file. As expected once compiled I end up with 4 .class files. It runs fine and everything but I have a question. Is there any way I can consolidate those 4 .class files into 1 or at least less than 4 files and still have the app remain runnable? How about making a .jar file? Can you archive the 4 .class files into a .jar and still run the app normally?
Also, is there a way to make an app self executable? So that I can put an Icon on Windows desktop and jave a user simply double click it?
Thanks.
Tom
20 years ago