?
Solved

Interaction between applets?

Posted on 2003-03-02
7
Medium Priority
?
160 Views
Last Modified: 2010-03-31
Hi

I'm running an applet to extract data from a database and put it into a bunch of text fields.However, I don't always know how many text fields will be used, (e.g. 2 for one run, 200 for another), therefore I would like to know how do you create textfields at the run-time of the java applet? Is it even possible? Or could I create another applet beside it, but then how do I inherite the actual results from the methods got in the other one?

thankx.
0
Comment
Question by:java_gurl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 8052764
Why not use a TextArea or JTextArea for the results?
0
 

Author Comment

by:java_gurl
ID: 8053052
Cehj, i've thought about that, but for reasons which i won't go into dealing with the database, i've got to use text fields. thanks anyway.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 8053082
Even better, why not use a JTable?
0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
LVL 6

Accepted Solution

by:
Ajar earned 200 total points
ID: 8054343

although you can create many text fields at runtime by

applet.add(new textField("data base data"))

You will run into problems of managing the display of many such text fields.


....
 If your criterion is only to display the database data then  you can use the html displaying functionality of JComponent like jlabel and jeditorpane.    
 For this read the data from sql resultset and make a HTML table string from it . Set this html string to jcomponent  and you can display the data of database elegantly



 
0
 

Expert Comment

by:CleanupPing
ID: 9058978
java_gurl:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9721218
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept Ajar's comment as answer.

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TimYates
EE Cleanup Volunteer
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses
Course of the Month11 days, 11 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question