/*
* TransparencyExample.java
*
* Created on 15 giugno 2004, 16.11
*/
/**
*
* @author Vassil Boyadjiev
*/
import javax.swing.JComponent;
import javax.swing.UIManager;
public class TransparencyExample extends javax.swing.JFrame {
/** Creates new form TransparencyExample */
public TransparencyExample() {
initComponents();
setSize(800,600);
sferyx.administration.editors.HTMLEditor htmlEditor1=new sferyx.administration.editors.HTMLEditor();
sferyx.administration.editors.HTMLEditor htmlEditor2=new sferyx.administration.editors.HTMLEditor();
internalFrame1.setSize(400,400);
internalFrame2.setSize(400,400);
htmlEditor1.setSourceEditorVisible(false);
htmlEditor1.setPreviewVisible(false);
htmlEditor1.setEditorTransparent(true);
htmlEditor2.setSourceEditorVisible(false);
htmlEditor2.setPreviewVisible(false);
htmlEditor2.setEditorTransparent(true);
internalFrame1.setOpaque(false);
((JComponent)internalFrame1.getContentPane()).setOpaque(false);
internalFrame2.setOpaque(false);
((JComponent)internalFrame2.getContentPane()).setOpaque(false);
internalFrame1.getContentPane().add(htmlEditor1);
internalFrame2.getContentPane().add(htmlEditor2);
jDesktopPane1.setBackground(java.awt.Color.lightGray.brighter());
setTitle("Transparency Example");
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
private void initComponents() {//GEN-BEGIN:initComponents
jDesktopPane1 = new javax.swing.JDesktopPane();
internalFrame1 = new javax.swing.JInternalFrame();
internalFrame2 = new javax.swing.JInternalFrame();
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
}
});
internalFrame1.setResizable(true);
internalFrame1.setVisible(true);
internalFrame1.setBounds(90, 130, 270, 140);
jDesktopPane1.add(internalFrame1, javax.swing.JLayeredPane.DEFAULT_LAYER);
internalFrame2.setResizable(true);
internalFrame2.setVisible(true);
internalFrame2.setBounds(20, 10, 290, 130);
jDesktopPane1.add(internalFrame2, javax.swing.JLayeredPane.DEFAULT_LAYER);
getContentPane().add(jDesktopPane1, java.awt.BorderLayout.CENTER);
pack();
}//GEN-END:initComponents
/** Exit the Application */
private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
System.exit(0);
}//GEN-LAST:event_exitForm
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
try
{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch(Exception exc)
{
}
new TransparencyExample().show();
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JInternalFrame internalFrame2;
private javax.swing.JDesktopPane jDesktopPane1;
private javax.swing.JInternalFrame internalFrame1;
// End of variables declaration//GEN-END:variables
}