DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3

Thread: Applet

Hybrid View

  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 !
    >>
    >>
    >>

    >



Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links