Applet


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Applet

  1. #1
    Daniel - Guest

    Applet


    Hi,
    I have just started on Java programming and I have encountered some
    problems. I am now using Label and TextField. Is there anyway to arrange
    them? Thanks in advance !




  2. #2
    Tom Duffy Guest

    Re: Applet


    Hello Daniel:

    Every componenet has a setBounds() method that expects 4 integers - left,
    top, width, height - in that order. Call it like this:

    label1.setBounds(0,0,100,25);

    This positions the top left corner of the label at coordinates (0,0) - the
    top left corner of the container - and sets the width to 100 pixels and the
    height to 25 pixels.

    Tom Duffy

    "Daniel" - wrote:
    >
    >Hi,
    > I have just started on Java programming and I have encountered some
    >problems. I am now using Label and TextField. Is there anyway to arrange
    >them? Thanks in advance !
    >
    >
    >



  3. #3
    Daniel Guest

    Re: Applet


    Thanks Tom.

    "Tom Duffy" <td4729@hotmail.com> wrote:
    >
    >Hello Daniel:
    >
    >Every componenet has a setBounds() method that expects 4 integers - left,
    >top, width, height - in that order. Call it like this:
    >
    >label1.setBounds(0,0,100,25);
    >
    >This positions the top left corner of the label at coordinates (0,0) - the
    >top left corner of the container - and sets the width to 100 pixels and

    the
    >height to 25 pixels.
    >
    >Tom Duffy
    >
    >"Daniel" - wrote:
    >>
    >>Hi,
    >> I have just started on Java programming and I have encountered some
    >>problems. I am now using Label and TextField. Is there anyway to arrange
    >>them? Thanks in advance !
    >>
    >>
    >>

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center