Results 1 to 4 of 4
Thread: gettext problems
- 12-01-2009, 05:41 PM #1
Member
- Join Date
- Apr 2009
- Posts
- 26
- Rep Power
- 0
gettext problems
Hi,
ok i know this should be very simple and straight forward.
I am simply trying to check the data that has been entered into a couple textfields. If i have set a default text the getText function reads it. Once i change the text when the program is running it still only gets the original text.
This is my code for the method:
Many thanksJava Code:private String testSettings(){ String status = null; String serv = serverAddress.getText(); String ports = port.getSelectedText(); String name = connectionName.getSelectedText(); if (serv==null) { JOptionPane.showMessageDialog(connect, "Please enter in server address or 'localhost'"); status="bad"; } if (ports==null) { JOptionPane.showMessageDialog(connect, "Please enter in connection name'"); status="bad"; } if(name==null) { JOptionPane.showMessageDialog(connect, "Please enter in port number"); status="bad"; } return status; }
gisler
-
I'm not sure what you're asking as we really don't see how you read in text or many other pertinent parts of your code. As for the method above, shouldn't it return a boolean instead of a pseudo-boolean String? If not a boolean, then at least an enum?
- 12-01-2009, 07:30 PM #3
Member
- Join Date
- Apr 2009
- Posts
- 26
- Rep Power
- 0
Your right. Returning a boolean makes a lot more sense.
I figured it out. it was as foolish as the problem. thanks for your time
-
Similar Threads
-
Problems here
By Keno777 in forum New To JavaReplies: 2Last Post: 11-13-2009, 11:35 AM -
how to getText() properly?
By javamula in forum New To JavaReplies: 12Last Post: 09-16-2009, 05:45 AM -
having problems
By pinkdiamondgail in forum New To JavaReplies: 6Last Post: 02-06-2009, 11:35 PM -
[SOLVED] new2java- gettext settext
By obdi in forum New To JavaReplies: 4Last Post: 07-21-2008, 09:28 AM -
problems with JPA
By Ed in forum New To JavaReplies: 2Last Post: 07-04-2007, 05:34 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks