Skip to content

Commit

Permalink
Add border DH parameters (#503)
Browse files Browse the repository at this point in the history
* add border DH parameters

* fix variable
  • Loading branch information
jgrateron authored Jun 26, 2024
1 parent fe4a278 commit 48f509b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions kse/src/main/java/org/kse/gui/dialogs/DViewDHParameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.ScrollPaneConstants;
import javax.swing.SwingUtilities;
import javax.swing.filechooser.FileNameExtensionFilter;

Expand Down Expand Up @@ -70,6 +72,7 @@ public class DViewDHParameters extends JEscDialog {
private static ResourceBundle res = ResourceBundle.getBundle("org/kse/gui/dialogs/resources");

private JTextArea jtAreaPem;
private JScrollPane jspAreaPem;
private JButton jbExport;
private JButton jbOK;
private JButton jbCopy;
Expand Down Expand Up @@ -106,8 +109,11 @@ private void initComponents(byte[] dhParams) throws CryptoException {
jtAreaPem.setEditable(false);
jtAreaPem.setFont(new Font(Font.MONOSPACED, Font.PLAIN, LnfUtil.getDefaultFontSize()));
// keep uneditable color same as editable
jtAreaPem.putClientProperty("JTextArea.infoBackground", Boolean.TRUE);
jtAreaPem.putClientProperty("JTextArea.infoBackground", Boolean.TRUE);

jspAreaPem = PlatformUtil.createScrollPane(jtAreaPem, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);

jbExport = new JButton(res.getString("DViewDHParameters.jbExport.export.text"));
jbExport.setToolTipText(res.getString("DViewDHParameters.jbExport.export.tooltip"));
PlatformUtil.setMnemonic(jbExport, res.getString("DViewDHParameters.jbExport.mnemonic").charAt(0));
Expand All @@ -120,7 +126,7 @@ private void initComponents(byte[] dhParams) throws CryptoException {

Container pane = getContentPane();
pane.setLayout(new MigLayout("insets dialog"));
pane.add(jtAreaPem, "span");
pane.add(jspAreaPem, "span");
pane.add(jbCopy, "tag Copy");
pane.add(jbExport, "tag Export");
pane.add(jbOK, "tag Ok");
Expand Down

0 comments on commit 48f509b

Please sign in to comment.