This week's book giveaway is in the General Computing forum.
We're giving away four copies of Raising Young Coders: A Parent’s Guide to Teaching Programming at Home and have Cassandra Chin on-line!
See this thread for details.

Rob Bass

Ranch Hand
+ Follow
since Aug 28, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Rob Bass

Hi all,
I am able to serializable out an interface that is extends serializable:
public interface EventSubscriber extends Serializable
but when I try restoring these classes I get a:
java.io.StreamCorruptedException
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1301)
I have been researching this issue on google but I cannot find a definitve answer, I read on a few postings that this only works if the class that implements the above interface has a no-arg constructor to initialize the class's state?
Please let me know if you havce any mor information.
Thanks,
Rob
21 years ago
All,
I am trying to detect when the user pushes backspace or delete but when the key event issent to my listener the keycode is 0?
Am I doing something wrong?
Rob
public void keyTyped(KeyEvent event) {
Object component = event.getSource();
if ( component instanceof JTextField ) {
JTextField field = (JTextField)component;
System.out.println(event.getKeyCode());
System.out.println(event.getKeyChar());
if ((event.getKeyCode() == KeyEvent.VK_BACK_SPACE) ||
(event.getKeyCode() == KeyEvent.VK_DELETE)) {
//user deleted their input all components should be
//enabled
if (field.getText().length() == 0 ) {
Component c[] = getComponents();
for (int i = 0; i < c.length; i++) {
JComponent temp = (JComponent)c[i];
temp.setEnabled(true);
}
}
}
else {
Component c[] = getComponents();
for (int i = 0; i < c.length; i++) {
JComponent temp = (JComponent)c[i];
if (!temp.hasFocus()) {
temp.setEnabled(false);
}
}
}
}
}
21 years ago
I will try this.
Thanks,
Rob
22 years ago
Hi all,
I have a JPanel with a BoxLayout. I have a lable and then a JTextField. When the panel is created the layout looks good, but when I maximize the JFrame the JTextField becomes HUGE. How can I get the JTextField to stay one size?
Any help would be appreciated.
Thanks,
Rob
22 years ago
Hello all,
I tried renaming a single directory using java.io.File renameTo and that worked, but when I added subdirectories it no longer worked?? Anyone know an easy way to do the above?
Thanks,
Rob
23 years ago
For example if I am on windows it should be something like C:\\TEMP
or if I am on Linux, it should be /tmp
Is there a system call?
Let me know.
Thanks,
Rob
23 years ago
Some additional information, I am using an InputSource where I specify the systemID
Below is my XML file:
<?xml version="1.0" encoding="UTF-8"?>
<test></test>
When I try to parse it using Xerces 1.4.3 I get this:
Stopping after fatal error: The markup in the document following the root element must be well-formed.
Why?
Thanks,
Rob
You are using this.class. I cannot use that. I am providing a service to read\parse xml files. All they will pass me is the location of the jar file.
With just the location of the jar file can I access the xml file contained within
Hello,
I need to parse an XML file that is in a JAR file. All i have is a path to the jar file, is there a way to access the xml file without unjaring the file?
Let me know,
Rob
Hello,
I am trying to write a CVS client, and I would like to use ssh, I am using Java Sockets, how would I authenciate myself on the server, what would i need to send it?
Any help would be appreciated.
Thanks,
Rob
23 years ago
I am writing a simple java class to copy xml files from one location to another location, but when I copy an XML file, I also need to copy it's associated Schema, whether it be a DTD or an XML Schema, does anyone know how I can get at the file name that represent the schema? I am using Xerces 1.4.3
Thanks guys, I will try and let you know.
23 years ago
Hello all,
I might have to write a CVS client in Java, so I was planning on using Runtime.exec("CVS Update etc.."); I am wondering how I would get messages CVS send back?
I know that Runtime returns a Process Object, and u can then get various streams, but I to print out the message returned but did not get anything. If anyone has some sample code, or could point me to a site where I can read up more on how to use Runtime class, I would appreciate it.
Thanks,
Rob
23 years ago
Hello all,
I have to write an API that has to interact with CVS. I was wondering if anyone knew if an API already existed? I found jCVS but it seems quite confusing. Also does CVS have an API ?
Let me know,
Rob
23 years ago