Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAVA GUI Problem

 
Doug Cates
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to complete an assignment that converts all lower case letters to uppercase in a GUI. This is what I have so far:


I think that I am doing something dumb in the

portion.

Any help would be very appreciated.
Thanks
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
These three lines:

g.drawString( String s = "The Gators Rule";
String s2 = s.toUpperCase();
System.out.println(s2); 20, 30 );


Look like the victim of a bad cut and paste. The first line is only part of a valid statement; the middle line is a complete valid statement, while the last line is a valid statement follows by what looks like the missing part of the first line.

Now, if this much isn't obvious to you, then it sounds like you have some pretty basic larnin' to do. Do you understand methods, method calls, arguments, stuff like that? If not, then that's where we've got to start.
 
Doug Cates
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, you are right. I wrote part of it, got some help and then copied the two together. Been spending too many hours doing this. I figgered it was something simple. Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic