• Post Reply Bookmark Topic Watch Topic
  • New Topic

JInternalFrame not fit on desktopPane in full size

 
manish kr. pandey
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a JInternalFrame Class

And call run time from JFrame class Menu Item open event.

code is following .............

DailyGreyInspectionReport ob1=new DailyGreyInspectionReport();

desktopPane.add(ob1);
ob1.setVisible(true);


when i click on open menu item JinternalFrame is open but on cover full screen.

How can i set jInternal frame in full size.

Please Help me!
 
tahelu kumar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi manish, can you please be more clear as i am unable to understand what this "DailyGreyInspectionReport" class is an your problem also.
and please write the code in code tags.
 
manish kr. pandey
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for my bad english.


DailyInspectionReport is a java class which extends JInternalFrame.

i am using netbeans ide to create java desktop application.

and select JInternalFrame from Swing gui category.

and add graphics component into the DailInspectionReport form.

and call DailInspectionReport file on MenuItem event of main MDI ApplicationForm which extends JFrame.
 
Rob Camick
Ranch Hand
Posts: 2700
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the JInternalFrame API and look at the "set" methods. You will find one that allows you to maximize the frame.
 
manish kr. pandey
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am trying following method but NullPointerException occured.



GreyInspectionData ob=new GreyInspectionData();
try{
ob.setMaximum(true);
}catch(Exception e)
{
System.out.println(e);
}

where GreyInspectionData is a JInternalFrame Class.
 
Olivier Legat
Ranch Hand
Posts: 176
Chrome Mac Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Manish,

JInternalFrame is an extension on Component, that means you can use setSize(Dimension) on it to explicitly set its size. However I recommend you do this only if you want your frame to be a specific constant size. Using something like...is more generic if you want a resizeable window.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!