package charactermanaj.ui;
-import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GraphicsEnvironment;
btnCancel.addFocusListener(focusAdapter);
btnBroseForDir.addFocusListener(focusAdapter);
- Container contentPane = getContentPane();
- contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));
-
ScaleSupport scaleSupport = ScaleSupport.getInstance(this);
+ JPanel contentPane = (JPanel) getContentPane();
+ int borderSize = (int)(5 * scaleSupport.getManualScaleX());
+ contentPane.setBorder(BorderFactory.createEmptyBorder(0, borderSize, borderSize, borderSize));
+ contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));
+
{
JLabel lbl = new JLabel(strings.getProperty("caption"));
lbl.setFont(lbl.getFont().deriveFont(Font.BOLD));
btnsBox.add(btnRemoveWorkingSets);
btnsBox.add(Box.createHorizontalGlue());
+ // OK, CANCELボタンのサイズを合わせる
+ Dimension dim = btnOK.getPreferredSize();
+ int btnWidth = Math.max(btnOK.getPreferredSize().width,
+ btnCancel.getPreferredSize().width);
+ dim.setSize(btnWidth, dim.height);
+ btnOK.setPreferredSize(dim);
+ btnCancel.setPreferredSize(dim);
+
if (!Main.isLinuxOrMacOSX()) {
btnsBox.add(btnOK);
btnsBox.add(btnCancel);