473,397 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How to use Buttons to execute a query to show database values in a JTable

Hi, everyone. I am using java swing. Till now I could able to display database values in a JTable by executing a query.

Now, what i needed is that i have to place two buttons(PREVIOUS,NEXT) one showing previous and one showing next values. Whether i have to declare database query separately for the two buttons or is there anything else which can show the results in JTable.

I have DB table which is maintaining records in a time basis. i need to display records in an interval of 8 hours. When i click NEXT button then it must display next 8 hours values and similarly when i click PREVIOUS button then it must show previous 8 hours values.

Please give me some suggestion regarding this.

Thanks in advance.
Mar 25 '11 #1
0 1340

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: news | last post by:
Hello I have a problem with show all values from my database into my html page! Example of my database: Namn: test.mdb Table: tblTest Columns: col1, col2, col3 The thing I want is to search...
2
by: Len4ik | last post by:
If I open Microsoft Access project without database window, how can I show it from VBA? I don't use startup option "Show database window". In the project disable option "special key". How can I...
7
by: narshe | last post by:
I haven't come across an elegant way to do this yet, and would like to know what other people have come up with. There are two tables: CREATE TABLE EmployeeStatus ( pkId int not null primary...
1
by: Prabhudhas Peter | last post by:
Hello, Need an easy way to Display the property values of an object (dynamically) ie I need to show the values of an Object in a rich text box. Background : We have a form, with a rich...
3
by: mkjets | last post by:
I have worked for hours on trying to find a solution and have not figured it out. I am working in Access 2003. I need to create a query that takes values from 1 table and displays them in...
1
by: onsir | last post by:
I have code like this, but still wrong. how to show data from database in JTable. package my.JavaNetBean; import java.sql.*; import java.io.*; import java.sql.Connection; import...
3
by: Max2006 | last post by:
Hi, I have a search result GridView bound to an ObjectDataSource. Once I open the asp.net page, the ObjectDataSource automatically refreshes the GridView which is the default behavior. I am...
2
by: juster21 | last post by:
I have a form that I have added a button to in the attempt to query my database. I am hoping to be able to generate a SQL statement based on 3 selections that the user makes. Once the SQL runs I...
3
by: ghjk | last post by:
i have two drop down boxes and when user select District from 1st drop down box , the cityis in that district should load to the second drop down. My code is below. But it is not working. Please...
2
dbrewerton
by: dbrewerton | last post by:
I have this table in SQL that I'm trying to do some comparison work with. Thanks in advance for any help you can give me. Ok, onto the schema. It's like this: id (numeric, primary, not null,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.