Results 1 to 4 of 4

Thread: GUI Objects

  1. #1
    larry_d1990 is offline Member
    Join Date
    Jan 2011
    Posts
    11
    Rep Power
    0

    Default GUI Objects

    I'm having trouble creating instances of classes through a GUI. I've only manually created objects before where I've named them myself, how do I do it so for eg through the click of a button where I can automatically create the instance of a class(automatically naming the object)??

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Not a clue what you are talking about.

  3. #3
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default

    Quote Originally Posted by larry_d1990 View Post
    I'm having trouble creating instances of classes through a GUI. I've only manually created objects before where I've named them myself, how do I do it so for eg through the click of a button where I can automatically create the instance of a class(automatically naming the object)??

    you can create a variable and inside the ActionListener you can instantiate your object and assign the reference to the variable. if you work with many object you can use collections to manage references and objects.

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

    Default

    Quote Originally Posted by masijade View Post
    Not a clue what you are talking about.
    *sigh* some people ... The op is having having trouble creating instances of classes through a GUI. The op only manually created objects before where the op named them him/herself, how does the op do it so for eg through the click of a button where the op can automatically create the instance of a class(automatically naming the object)??

    Do I always have to explain everything here?

    kindest regards,

    Loretta ;-)
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Help with objects
    By gmoney8316 in forum New To Java
    Replies: 1
    Last Post: 05-06-2010, 03:03 AM
  2. How to map 2 different objects together?
    By einnhann in forum New To Java
    Replies: 5
    Last Post: 12-22-2009, 10:42 AM
  3. Replies: 1
    Last Post: 01-22-2009, 05:25 PM
  4. Two Objects
    By losintikfos in forum New To Java
    Replies: 3
    Last Post: 11-14-2008, 08:04 PM
  5. how many objects ?
    By kevinsong in forum Advanced Java
    Replies: 16
    Last Post: 07-16-2008, 06:59 PM

Posting Permissions

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