AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

populate a box

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
fb
Guest





PostPosted: Sun Nov 26, 2006 8:10 am    Post subject: populate a box Reply with quote



Hello. I was thinking about writing a program that would send a search
parameter to a database and have the result set displayed in an html or
jsp box of some sort, so that if the user clicks that item, they could
be sent to another page that would allow them to do something to that data.

The problem is getting the data from the server to populate inside a
box. I'm not entirely sure what kind of list or combo box I should use,
nor do i know how to place the items in this box. Does anyone know How
I can do this, or have an example somewhere?

Thanks!
Back to top
Rhino
Guest





PostPosted: Sun Nov 26, 2006 8:10 am    Post subject: Re: populate a box Reply with quote



"fb" <fb (AT) noway (DOT) com> wrote in message
news:qcaah.373238$5R2.350976@pd7urf3no...
Quote:
Hello. I was thinking about writing a program that would send a search
parameter to a database and have the result set displayed in an html or
jsp box of some sort, so that if the user clicks that item, they could be
sent to another page that would allow them to do something to that data.

The problem is getting the data from the server to populate inside a box.
I'm not entirely sure what kind of list or combo box I should use, nor do
i know how to place the items in this box. Does anyone know How I can do
this, or have an example somewhere?


A result set from a database, assuming it is more than one column, would be
best suited to go in a JTable. If you look at the Java Tutorial -
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html -
you'll see information about how to use/populate a JTable.

For a single column result set from a database, you could streamline things
and simply use a JList -
http://java.sun.com/docs/books/tutorial/uiswing/components/list.html - or a
JComboBox -
http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html.

Editing the data which you display in the JTable/JList/JComboBox is a whole
separate issue. If you use a JTable, you can edit the data right in the
JTable. If you use a JList or JComboBox, you may want your code to display
an edit dialog when you click on a value in the list or combobox.

--
Rhino
Back to top
Andrew Thompson
Guest





PostPosted: Sun Nov 26, 2006 8:10 am    Post subject: Re: populate a box Reply with quote



fb wrote:
Quote:
Hello. I was thinking about writing a program that would send a search
parameter to a database and have the result set displayed in an html or
jsp

JSP ends up as HTML in the browser. It is important
to understand that, and the implications.

Quote:
....box of some sort, so that if the user clicks that item, they could
be sent to another page that would allow them to do something to that data.

The problem is getting the data from the server to populate inside a
box. I'm not entirely sure what kind of list or combo box I should use,
nor do i know how to place the items in this box.

A Swing based rich client can connect with the (internet
or LAN based) DB. But if you want to keep it light on the
client side, with no Java dependency, it can also be done
with pure HTML, which is open to the widest range of users,
or DHTML (a combination of HTML and JavaScript), that
provides better response, and more ways of updating data.

The last route (DHTML) would be the most common
for internet based DB access, and involves technology
such as AJAX.

Quote:
... Does anyone know How
I can do this, or have an example somewhere?

If what you want is 'slick access to the D/B for a
business user', I would recommend Swing rich client
(the business user will download the Java Plug-In,
if they need it). OTOH - for getting a 'wide audience',
I would go for DHTML that degraded gracefully to
pure HTML.

Andrew T.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.