• 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

adding swing component later

 
Ranch Hand
Posts: 384
MyEclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ranchers ,

i am facing a gui related problem . Let me explain context of the problem. I am creating a Client side GUI Swing interface for RMI based Lotto application.
The client side
i have created a JTextField which takes the user input munbers and there is JButton("OK"). And have added these components to JFrame.
when user clicks "ok" button the .numbers is send to server.
Server generate a random number and match against all input numbers.If any of number match MSG = "win" else MSG="loss". And send this message to client.

Now the problem is
how can i show up this message in GUI component on client side ?




 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Create and add JLabel instance to GUI
On getting the server input, call setText() on the label instance, to display the message
 
naveen yadav
Ranch Hand
Posts: 384
MyEclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Maneesh Godbole wrote:Create and add JLabel instance to GUI
On getting the server input, call setText() on the label instance, to display the message



thank you
 
reply
    Bookmark Topic Watch Topic
  • New Topic