• Post Reply Bookmark Topic Watch Topic
  • New Topic

need java help!

 
alfred pawling
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello every one,
thank you for your answers and suggestions!

I have two questions to ask for you:
1:
having an java application (JBuilder)where I use a button, how to call an Html page when clicking on this button?(in my case I made a web site with FrontPage )so how to call the first page (ie:index)when clicking on the button?

2:
I have a textField where i input my text, but my contion is that this textField must contain one caractere or more and no blanks!!!
I used:

code:
----------------------------------------------------------------------------

String s = textFiel1.gettext();if(s.equals(""))System.out.println("error!");else System.out.println("no error");

----------------------------------------------------------------------------



the problem is when I type the space kEY it considers it as a caracter so
the result of the execution is : no error!!!

what must I do to recognize this caracter?

waiting for your help!
thanks for you!
 
Pavel Kubal
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) use Runtime.exec() method

2) method trim() trims blank spaces


[ August 03, 2004: Message edited by: Pavel Kubal ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!