Results 1 to 3 of 3

Thread: Maintaining Separate classes for all the tabs in a Java application. Share/Save - My123World.Com!

  1. #1

    Maintaining Separate classes for all the tabs in a Java application.

    Any Java Developers here.........?

    I have a requirement of developing an application with the below mentioned features:

    1) The application should contains Tabs(i have used tabbedPane).
    2) Each tab is independent and has its own layout and its functionality. And hence i wish to have a separate class for each tab's appearance and later a separate class which deals with the action event of that particular tab.
    3) Lastly i wish to leave a feature to the users, which has the capability of adding new tabs to the application and the functionality they wish to have.(without the author updating the software to a new version)

    A simple example, that i wish to share is....lets consider that we wish to club our Calculator class/application(GUI), Distance Conversion class/application(GUI),Temperature Conversion class/application(GUI) into a generic application called Homeneeds which has tabs containing these applications.And later if someone wants to add their own application(ex: Stop Watch) to the Homeneeds application as a separate tab, they should be able to add it without any difficulty of changing the existing code written by the author.

    or just consider the Burp suite as an example.

    Wish to hear form u guys about the design approach and few code examples if possible.

    Thanks,
    Stmh

  2. #2
    Security Researcher fb1h2s's Avatar
    Join Date
    Jul 2010
    Location
    India
    Posts
    616
    Blog Entries
    32
    So am curious how has Burpsuite done this ? Assuming you have already checked burpsuite code.
    Hacking Is a Matter of Time Knowledge and Patience

  3. #3

    Mediator/Intermediate Class

    Namaste

    This is done using the concept of "Mediator" or better known as "Intermediate Class".

    The mediator/intermediate class has the knowledge of all the internally accessible objects+methods of all member classes.

    All the interaction of user interface is done via this intermediate class. The intermediate class or another class handling GUI can create GUI objects according to the objects presented to it via intermediate class.

    Actually in real life, intermediate class has instantiated objects of all the classes and those are the objects via whoe it interacts among different class methods/variables/members.

    I hope, this will help you in materializing ur concepts.

    ..."vinnu"

Posting Permissions

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