Bug 100439 - With Java 5, Window.show() is deprecated
Summary: With Java 5, Window.show() is deprecated
Status: CLOSED DUPLICATE of bug 93503
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: VE (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Peter Walker CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-16 12:54 EDT by Michael Quinlan CLA
Modified: 2011-06-13 11:37 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Quinlan CLA 2005-06-16 12:54:33 EDT
When generating code for a Swing application, VE generates calls to 
Component.show(). With Java 5 this method has been deprecated and should be 
replaced by setVisible(true). Examples of generated code are:

public static void main(String[] args) {
	// TODO Auto-generated method stub
	Test2 application = new Test2();
	application.show();
}

private JMenuItem getAboutMenuItem() {
	if (aboutMenuItem == null) {
		aboutMenuItem = new JMenuItem();
		aboutMenuItem.setText("About");
		aboutMenuItem.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				new JDialog(Test2.this, "About", true).show();
			}
		});
	}
	return aboutMenuItem;
}

In both cases the call to show() should be replaced by calls to setVisible
(true).
Comment 1 Richard Kulp CLA 2005-06-16 17:47:25 EDT
FYI: That wasn't deprecated in 1.5, it was deprecated in 1.1. I don't know how
we missed it.
Comment 2 Richard Kulp CLA 2005-07-29 12:35:28 EDT

*** This bug has been marked as a duplicate of 93503 ***
Comment 3 Richard Kulp CLA 2006-04-07 13:45:00 EDT
closing