Results 1 to 3 of 3
  1. #1
    vknehra10 is offline Senior Member
    Join Date
    Dec 2016
    Posts
    103
    Rep Power
    0

    Default how to call another jframe in java without constructor

    how to call another jframe in java without constructor

  2. #2
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,989
    Rep Power
    8

    Default Re: how to call another jframe in java without constructor

    You should give us a little more to work with. These forum threads are allowed to be longer than one sentence.

    Write your problem down in a clear way. If you can't write your problem down, you don't understand your own problem, so how can we?

    Regarding your question: why is a constructor a bad thing?

    Just to show you how a bad question gets you a bad answer, here's exactly what you are looking for: creating a JFrame without a constructor.
    Java Code:
    JFrame f = Class.forName("javax.swing.JFrame").newInstance();
    Good luck with that.

    Happy coding!
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  3. #3
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: how to call another jframe in java without constructor

    The OP needs to reflect on your suggestion. :)

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. How to call a constructor in main
    By ymbulk in forum New To Java
    Replies: 4
    Last Post: 07-03-2014, 05:58 PM
  2. Replies: 5
    Last Post: 08-11-2012, 09:50 AM
  3. Is there anyway not to call superclass constructor ?
    By fatabass in forum New To Java
    Replies: 4
    Last Post: 01-29-2012, 09:01 PM
  4. Replies: 5
    Last Post: 12-14-2011, 01:47 PM
  5. Constructor call not calling
    By Singing Boyo in forum New To Java
    Replies: 5
    Last Post: 06-09-2009, 01:06 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
  •