Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

DB problem

  Asked By: Alma    Date: Oct 04    Category: Java    Views: 539
  

i want to retrieve data from DB and send these to applet. but i have 2 questions: 1- how can i show data in applet?(i must using java controls like label?) 2- height and width of applet isn't fixed (depend of number of data that i must shown) how can i set this from code? if i don't place width and height of applet in applet tag, it's change dynamically?

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Kyle Fox     Answered On: Oct 04

1 - your designing to show  your data  on the form is like swing application approachs.
2 - height and width  of your applet  set by <applet width="100" height="200"></applet> tag  in html or jsp or any other technology that you use.

 
Answer #2    Answered By: Leonard Pierce     Answered On: Oct 04

Y dont u try JTalbe for rendering and showing your data. I think JTable is good solution for representing your data  are retrieved from your database.

 
Answer #3    Answered By: Elisabeth Bell     Answered On: Oct 04


You can use Swing's components such as JTable, see: java.sun.com/.../table.html

For size of your applet, it has no direct solution and you should do a trick.
for example in your JSP:

<applet ... width=<%= ( number_of_rows * a_constant) %> ../>

 
Didn't find what you were looking for? Find more on DB problem Or get search suggestion and latest updates.




Tagged: