• 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 ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Displaying Select results from search interface in a new swing interface

 
Greenhorn
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:
 
Sheriff
Posts: 24743
59
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!)
 
Been there. Done that. Went back for more. But this time, I took this tiny ad with me:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!