Results 1 to 3 of 3
  1. #1
    Dipke is offline Member
    Join Date
    Aug 2010
    Location
    Leuven, Belgium
    Posts
    86
    Rep Power
    0

    Default Inner or outer class

    Hi,

    I am building a GUI.
    This has a menubar, toolbar and a mainpanel in different classes.
    Is it better to create a package GUI and put the classes in an outer classes or to put all the classes into a large GUI with inner classes ?

    Grz

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,651
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Dipke View Post
    I am building a GUI.
    This has a menubar, toolbar and a mainpanel in different classes.
    Is it better to create a package GUI and put the classes in an outer classes or to put all the classes into a large GUI with inner classes ?
    Start by implementing everything as top level classes (possibly in one or more packages); if some classes really have no right of existence outside another top level class you can make it an inner class. Note that a top level class that contains many inner classes becomes one big moloch of a class that is hard to maintain. Maybe a bit better would be to leave them all at the top level but don't make them public classes.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    Dipke is offline Member
    Join Date
    Aug 2010
    Location
    Leuven, Belgium
    Posts
    86
    Rep Power
    0

Similar Threads

  1. The outer loop doesnt stop running
    By Bulelakes in forum JDBC
    Replies: 16
    Last Post: 08-23-2010, 09:42 AM
  2. Replies: 3
    Last Post: 01-29-2010, 08:05 AM
  3. Replies: 0
    Last Post: 02-17-2008, 09:03 AM
  4. Replies: 0
    Last Post: 02-17-2008, 09:01 AM
  5. Inner class accessing outer class
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-17-2008, 08:59 AM

Tags for this Thread

Posting Permissions

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