Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Displaying Select results from search interface in a new swing interface

Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys, so I'm not really sure if this is possible or not. I'm looking for a few pointers.
I have a search interface in eclipse that displays my results in a swing gui. The search aspect works the way I want it too, but I want to be able to click the results and have them pop up in a second interface where the results are laid out in different  Jfields, if that makes sense. So for instance, my program shows results for video name, description, and city (among other things). So after I complete a search, I want to be able to click say the first result and then I was planning on having a button that said something like "view video" so upon clicking the button, I want a new interface to pop up and have a label that says "Video name" and then have the result be auto populated into the Jfield for "video name". I'm not asking for a code or anything, just if this sounds like something possible to do? I know how to make the interface and have the button connect and all that, but I'm a little confused as to what SQL statement I would implement to have the results of the search continue into another interface.

In case seeing my current code helps:
Posts: 25594
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understood what you were asking right up until you said you were looking for an SQL statement. Then I was totally confused.

Here's what I thought you wanted to do. First, you're getting information about videos and displaying that information in a JTable. (Seems like that part is working okay.) Then next, you want the user to be able to select a row and have the columns of that row be copied into JTextField components.

So what I would do is provide a JButton which, when clicked, copies the information from the selected row into those components. I don't see SQL playing any part in that at all. Unless I misunderstood what you wanted to do. (Always a possibility!)
Whip out those weird instruments of science and probe away! I think it's a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic