1

I'm making a small application. I have a JFrame and there is a desktop pane in it. I want to load a JInternalFrame to it.

My code is as below.

void dpload(){
        Patients patient = new Patients();
        dp_patient.add(patient);
        patient.setVisible(true);
  }

Patients = JInternalFrame
patient = created object
*dp_patient = desktopPane*

When I test it for the first time, it compiles fine. But if I do any modification for the JInternalFrame and run, it does not change its modifications.

But when I change the object name (patient) and run again, changes happens.

for an example;

i changed the size of a button in JInternalFrame. When i run the project, size has not changed. If i change the object name (patient>>> patients) size change is taken place.

How can I fix this?

Hasi007
  • 146
  • 2
  • 14
  • 4
    1) *"How can I fix this?"* I still don't understand the question. If this is a compilation error, copy/paste the error. 2) For better help sooner, post an [SSCCE](http://sscce.org/). 3) Learn common [Java naming conventions](http://java.sun.com/docs/books/jls/second_edition/html/names.doc.html#73307) (specifically the case used for the names) for class, method & attribute names & use it consistently. – Andrew Thompson Dec 26 '12 at 06:11
  • hi Please specify what is your JFrame and JInternalFrame object name. What is your dp_patient and patient. – amod Dec 26 '12 at 06:11
  • There is no error. All working fine. Im using netbeans 6.0.1. when i clean the project and run again, the problem wont arise for the first time. – Hasi007 Dec 26 '12 at 06:48
  • 2
    *For better help sooner, post an [SSCCE](http://sscce.org/).* – Andrew Thompson Dec 26 '12 at 08:27

0 Answers0