use of java.awt.FlowLayout in project nhin-d by DirectProject.
the class PKCS11SecretKeyManager method initUI.
private void initUI() {
this.getContentPane().setLayout(new BorderLayout(5, 5));
// Top Panel
JPanel topPanel = new JPanel();
topPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
addAESKeyButton = new JButton("Add AES Key");
addAESKeyButton.setSize(new Dimension(30, 100));
addGenericKeyButton = new JButton("Add Text Key");
addGenericKeyButton.setSize(new Dimension(30, 100));
removeKeyButton = new JButton("Remove Key(s)");
removeKeyButton.setSize(new Dimension(30, 100));
topPanel.add(addAESKeyButton);
topPanel.add(addGenericKeyButton);
topPanel.add(removeKeyButton);
this.getContentPane().add(topPanel, BorderLayout.NORTH);
// Middle and list panel
JPanel midPanel = new JPanel();
midPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
midPanel.setLayout(new BorderLayout(5, 5));
JLabel keyListLabel = new JLabel("Secret Keys:");
Object[][] data = {};
String[] columnNames = { "Key Alias", "Key Type", "Key Value" };
keyDataModel = new DefaultTableModel(data, columnNames);
keyDataTable = new JTable(keyDataModel);
JScrollPane scrollPane = new JScrollPane(keyDataTable);
keyDataTable.setFillsViewportHeight(true);
midPanel.add(keyListLabel, BorderLayout.NORTH);
midPanel.add(scrollPane, BorderLayout.CENTER);
this.getContentPane().add(midPanel, BorderLayout.CENTER);
// Bottom Panel
JPanel bottomPanel = new JPanel();
bottomPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
quitButton = new JButton("Quit");
quitButton.setSize(new Dimension(30, 100));
bottomPanel.add(quitButton);
this.getContentPane().add(bottomPanel, BorderLayout.SOUTH);
}
use of java.awt.FlowLayout in project nhin-d by DirectProject.
the class PKCS11SecretKeyManagerUI method initUI.
private void initUI() {
this.getContentPane().setLayout(new BorderLayout(5, 5));
// Top Panel
JPanel topPanel = new JPanel();
topPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
addAESKeyButton = new JButton("Add AES Key");
addAESKeyButton.setSize(new Dimension(30, 100));
addGenericKeyButton = new JButton("Add Text Key");
addGenericKeyButton.setSize(new Dimension(30, 100));
removeKeyButton = new JButton("Remove Key(s)");
removeKeyButton.setSize(new Dimension(30, 100));
topPanel.add(addAESKeyButton);
topPanel.add(addGenericKeyButton);
topPanel.add(removeKeyButton);
this.getContentPane().add(topPanel, BorderLayout.NORTH);
// Middle and list panel
JPanel midPanel = new JPanel();
midPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
midPanel.setLayout(new BorderLayout(5, 5));
JLabel keyListLabel = new JLabel("Secret Keys:");
Object[][] data = {};
String[] columnNames = { "Key Alias", "Key Type", "Key Value" };
keyDataModel = new DefaultTableModel(data, columnNames);
keyDataTable = new JTable(keyDataModel);
JScrollPane scrollPane = new JScrollPane(keyDataTable);
keyDataTable.setFillsViewportHeight(true);
midPanel.add(keyListLabel, BorderLayout.NORTH);
midPanel.add(scrollPane, BorderLayout.CENTER);
this.getContentPane().add(midPanel, BorderLayout.CENTER);
// Bottom Panel
JPanel bottomPanel = new JPanel();
bottomPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
quitButton = new JButton("Quit");
quitButton.setSize(new Dimension(30, 100));
bottomPanel.add(quitButton);
this.getContentPane().add(bottomPanel, BorderLayout.SOUTH);
}
use of java.awt.FlowLayout in project nhin-d by DirectProject.
the class CAPanel method initUI.
protected void initUI() {
setLayout(new BorderLayout());
//setBorder(new SoftBevelBorder(BevelBorder.LOWERED));
setBorder(new CompoundBorder(new SoftBevelBorder(BevelBorder.LOWERED), new EmptyBorder(5, 5, 5, 5)));
createCA = new JRadioButton("Create New CA");
loadCA = new JRadioButton("Load CA");
ButtonGroup group = new ButtonGroup();
group.add(createCA);
group.add(loadCA);
createCA.setSelected(true);
JPanel radioPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
radioPanel.add(createCA);
radioPanel.add(loadCA);
JPanel fieldsPanel = new JPanel();
fieldsPanel.setLayout(new GridLayout(3, 3, 10, 10));
cnField = new TextEntryField("CN:");
fieldsPanel.add(cnField);
countryField = new TextEntryField("Country:");
fieldsPanel.add(countryField);
stateField = new TextEntryField("State:");
fieldsPanel.add(stateField);
locField = new TextEntryField("Location:");
fieldsPanel.add(locField);
orgField = new TextEntryField("Org:");
fieldsPanel.add(orgField);
emailField = new TextEntryField("Email:");
fieldsPanel.add(emailField);
expField = new SpinEntryField("Experiation (Days):", 365);
fieldsPanel.add(expField);
keyStr = new DropDownEntry("Key Strength:", new Object[] { 1024, 2048, 4096 });
fieldsPanel.add(keyStr);
passField = new PasswordField("Password:");
fieldsPanel.add(passField);
JPanel topPanel = new JPanel(new BorderLayout());
topPanel.add(radioPanel, BorderLayout.NORTH);
topPanel.add(fieldsPanel, BorderLayout.CENTER);
add(topPanel, BorderLayout.NORTH);
new FlowLayout(FlowLayout.LEFT);
certFileField = new FileField("Certificate Authority File:", "");
keyFileField = new FileField("Private Key File:", "");
JPanel filePanel = new JPanel(new GridLayout(1, 2));
filePanel.add(certFileField);
filePanel.add(keyFileField);
loadCert = new JButton("Load");
loadCert.setVisible(false);
createCert = new JButton("Create");
clear = new JButton("Clear");
clear.setVisible(false);
clear = new JButton("Clear");
genCert = new JButton("Create Leaf Cert");
genCert.setVisible(false);
signCSR = new JButton("Sign CSR");
signCSR.setVisible(false);
addToAltSubjects = new JCheckBox("Add Email To Alt Subject Names");
addToAltSubjects.setVisible(false);
addToAltSubjects.setSelected(true);
allowedToSign = new JCheckBox("Allowed To Sign Certificates");
allowedToSign.setVisible(false);
keyEnc = new JCheckBox("Key Encipherment Use");
keyEnc.setVisible(false);
keyEnc.setSelected(true);
digitalSig = new JCheckBox("Digital Signature Use");
digitalSig.setVisible(false);
keyEnc.setSelected(true);
JPanel addAltPanel = new JPanel(new GridLayout(2, 2));
addAltPanel.setPreferredSize(new Dimension(450, addAltPanel.getPreferredSize().height));
//addAltPanel.add(addToAltSubjects);
addAltPanel.add(allowedToSign);
addAltPanel.add(keyEnc);
addAltPanel.add(digitalSig);
JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
buttonPanel.add(addAltPanel);
buttonPanel.add(loadCert);
buttonPanel.add(createCert);
buttonPanel.add(clear);
buttonPanel.add(genCert);
buttonPanel.add(signCSR);
JPanel combineAltAndButtonPanel = new JPanel(new BorderLayout());
//combineAltAndButtonPanel.add(addAltPanel, BorderLayout.WEST);
combineAltAndButtonPanel.add(buttonPanel, BorderLayout.EAST);
JPanel bottomPannel = new JPanel(new BorderLayout());
bottomPannel.add(filePanel, BorderLayout.NORTH);
bottomPannel.add(combineAltAndButtonPanel, BorderLayout.SOUTH);
this.add(bottomPannel, BorderLayout.SOUTH);
}
use of java.awt.FlowLayout in project nhin-d by DirectProject.
the class ValidatePanel method initUI.
protected void initUI() {
setLayout(new BorderLayout());
setBorder(new CompoundBorder(new SoftBevelBorder(BevelBorder.LOWERED), new EmptyBorder(5, 5, 5, 5)));
// File Load Fields
policyFileField = new FileField("Policy Definition File:", "");
certFileField = new FileField("Certificate File: ", "");
final JPanel filePanel = new JPanel(new GridLayout(1, 2));
filePanel.add(certFileField);
filePanel.add(policyFileField);
this.add(filePanel, BorderLayout.NORTH);
// Report panel
final JLabel reportHeaderLabel = new JLabel("Validation Report");
reportText = new JTextArea();
reportText.setLineWrap(true);
reportText.setWrapStyleWord(true);
reportText.setEditable(false);
final JScrollPane scrollPane = new JScrollPane(reportText);
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
final JPanel reportPanel = new JPanel(new BorderLayout());
reportPanel.add(reportHeaderLabel, BorderLayout.NORTH);
reportPanel.add(scrollPane, BorderLayout.CENTER);
this.add(reportPanel, BorderLayout.CENTER);
// Button Panel
cmdValidate = new JButton("Validate");
JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
buttonPanel.add(cmdValidate);
this.add(buttonPanel, BorderLayout.SOUTH);
}
use of java.awt.FlowLayout in project jdk8u_jdk by JetBrains.
the class LWDispatcherMemoryLeakTest method init.
public static void init() throws Throwable {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
frame = new JFrame();
frame.setLayout(new FlowLayout());
button = new WeakReference<JButton>(new JButton("Text"));
p = new WeakReference<JPanel>(new JPanel(new FlowLayout()));
p.get().add(button.get());
frame.add(p.get());
frame.setBounds(500, 400, 200, 200);
frame.setVisible(true);
}
});
Util.waitTillShown(button.get());
Util.clickOnComp(button.get(), new Robot());
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
frame.remove(p.get());
}
});
Util.waitForIdle(null);
assertGC();
}
Aggregations