Results 1 to 8 of 8
Like Tree1Likes
  • 1 Post By kjkrum

Thread: Form from scratch

  1. #1
    pabloma2002 is offline Member
    Join Date
    Dec 2010
    Posts
    25
    Rep Power
    0

    Default Form from scratch

    How can I write a form from scratch, without using awt, swing or lwuit?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    Quote Originally Posted by pabloma2002 View Post
    How can I write a form from scratch, without using awt, swing or lwuit?
    You tell us what you don't want to use, but give us no clue as to what you do want to use or your reasons for not using the others. Also you may want to tell us more on just what you mean by a "form".

  3. #3
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,058
    Rep Power
    5

    Default

    Uh... write your own JNI interface to the native window/widget library, I guess.

    Why in the world would you not use Swing/AWT?
    Fubarable likes this.
    Get in the habit of using standard Java naming conventions!

  4. #4
    pabloma2002 is offline Member
    Join Date
    Dec 2010
    Posts
    25
    Rep Power
    0

    Default

    By form I mean a GUI form. The reason why I want to build it from scratch is Iím tired of fumbling in the dark every time I want to do something which leans half an inch outside the box. So letís pretend swing and awt do not exist and I want to create a form, how do I do it?

  5. #5
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,001
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by pabloma2002 View Post
    By form I mean a GUI form. The reason why I want to build it from scratch is I’m tired of fumbling in the dark every time I want to do something which leans half an inch outside the box. So let’s pretend swing and awt do not exist and I want to create a form, how do I do it?
    You have to draw each and every pixel yourself; and that is just for the view part. You also have to implement the entire feel part for each component. Better use Swing.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  6. #6
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,058
    Rep Power
    5

    Default

    I’m tired of fumbling in the dark every time I want to do something which leans half an inch outside the box.
    Sounds like Java is not the language for you. Java deliberately restricts you to doing things in portable ways.

    So yeah... you want to code forms "outside the box", find a Java binding to your platform's native window/widget library (like this) or write your own.
    Get in the habit of using standard Java naming conventions!

  7. #7
    pabloma2002 is offline Member
    Join Date
    Dec 2010
    Posts
    25
    Rep Power
    0

    Default

    Ok, I'll let it go. But for the record, I don't think "accurate dragging on a touch screen", to give you an example, is possible using either swing, awt or (in the case of midlets) lwuit. The fact that they average the width of the touched surface means that any slight difference of pressure or rolling of the finger will translate into a movement.

  8. #8
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,058
    Rep Power
    5

    Default

    I don't think the type and precision of the pointer input device are even accessible to the standard Java API. Java operates at a much higher level of abstraction. The details of pointer hardware probably demand native code and JNI bindings.
    Get in the habit of using standard Java naming conventions!

Similar Threads

  1. creating an image from scratch
    By satanfx55 in forum AWT / Swing
    Replies: 2
    Last Post: 05-15-2011, 11:59 AM
  2. java from scratch
    By waqar100 in forum New To Java
    Replies: 2
    Last Post: 10-06-2010, 08:05 AM
  3. Replies: 8
    Last Post: 10-03-2010, 09:45 AM
  4. gui builder vs from scratch
    By dinosoep in forum New To Java
    Replies: 5
    Last Post: 08-08-2010, 11:12 AM
  5. Replies: 1
    Last Post: 08-10-2009, 11:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •