• 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

displaying data from database

 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi guys,

i have created my first gui projects interface. the interface consists of a few combo boxes and buttons. now what i want is a simple tutorial that teaches me how to retrieve information form a back end database using the values input by the user into the interface. any suggestions?

and i was also wondering where i can learn how to display a new window on clicking a button and also how to display new contents in an already visible window i.e wiping off entire components being displayed on a window and replacing them with new components.
 
Ranch Hand
Posts: 384
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please let us know how you have developed your code ... everytime you ask something do post relative content like your code with it

you can learn opening a new window from www.w3schools.com
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Lalit Mehra wrote:you can learn opening a new window from www.w3schools.com


What does anything on that site have to do with Swing? or indeed Java?
 
Lalit Mehra
Ranch Hand
Posts: 384
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Darryl Burke wrote:

Lalit Mehra wrote:you can learn opening a new window from www.w3schools.com


What does anything on that site have to do with Swing? or indeed Java?



well he asked about opening a new window on a button ... so i answered him the same ... i know there's nothing on that site related to java ... but yes there are things he can learn from there which java has to work with ... like something he asked about ... chao

chill
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Lalit Mehra wrote:i know there's nothing on that site related to java ...



In other words the link was completely irrelevant.

but yes there are things he can learn from there which java has to work with



It's possible that eventually he might come to some tutorial which explained how to open a browser window with Javascript, or something which sounds superficially the same but in reality is completely different.

Please don't post such useless things in future.
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

thejwal pavithran wrote:now what i want is a simple tutorial that teaches me how to retrieve information form a back end database using the values input by the user into the interface. any suggestions?



Bringing the thread back on topic... what you would use for retrieving information from a database is JDBC. Here's a link to Oracle's JDBC tutorial: Lesson: JDBC Basics.

and i was also wondering where i can learn how to display a new window on clicking a button and also how to display new contents in an already visible window i.e wiping off entire components being displayed on a window and replacing them with new components.



Usually you wouldn't do that. It's best to think of a GUI panel as something whose contents are fixed, more or less. So if you want to show a panel with completely different information, you should create a new panel which contains that different information and display that panel instead of the old panel. There are several different ways of doing that and I don't want to recommend a particular one. At any rate you probably don't know enough about Swing to understand the pros and cons of those different ways anyway, so at this point you should really just start experimenting with Swing. Go through Oracle's Swing tutorial: Trail: Creating a GUI With JFC/Swing for a start and work with the examples you'll find there.
 
Lalit Mehra
Ranch Hand
Posts: 384
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I I Captain ... I thought he needed an advice ... anyways ...
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Lalit Mehra wrote:I I Captain ...


I think you mean "Aye aye Captain"
 
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic