• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JAVA GUI Problem

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic