applet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rengaraj
    New Member
    • Jan 2007
    • 168

    #1

    applet

    hi dears!
    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?

    thanks.
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by rengaraj
    hi dears!
    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?

    thanks.
    To connect and retrievs data from a database you need to know JDBC.
    For the applet interface design part, I suggest you have a read at Sun's applets tutorial.

    Comment

    • BigDaddyLH
      Recognized Expert Top Contributor
      • Dec 2007
      • 1216

      #3
      Do you have to use an applet? Why not write a standalone application with a JFrame? Then it would be a simple matter to change its size and indeed to make it resizable. I try to avoid using applets when there's a better solution. There are also hurdles when you want an apple to connect to a database, because the database is usually on a different machine from the web server the applet was downloaded from.

      As for designing the GUI, the applet aspect is a minor one. Take the whole tutorial:
      http://java.sun.com/docs/books/tutor...ing/index.html

      Comment

      Working...