import java.awt.BorderLayout; import java.util.Locale; import javax.swing.; import mdiframework.MDIPlugin; public class MyPlugin extends MDIPlugin { private JInternalFrame iFrame = null; private JLabel jLabel = null; public JInternalFrame getJInternalFrame() { if (this.iFrame == null) { this.iFrame = new JInternalFrame(); this.iFrame.getContentPane() .setLayout(new BorderLayout()); this.iFrame.getContentPane() .add(this.getJLabel(), BorderLayout.CENTER); this.iFrame.setSize(400, 400); } return this.iFrame; } public JLabel getJLabel() { if (this.jLabel == null) { this.jLabel = new JLabel(); this.jLabel.setText("Hello plug-in !!!"); this.jLabel.setHorizontalAlignment( SwingConstants.CENTER); } return this.jLabel; } public String getPluginName() { return "My plug-in"; } public int getPreferredIndex() { return 1; } public String getSubmenuName() { return "New extensions"; } public void setResourceBundle(Locale locale) { // Optional: Set the resource bundle: /* this.bundle = ResourceBundle .getBundle("PluginBundle", locale); */ } }