Java Code Examples for org.jdesktop.swingx.JXPanel#setBorder()
The following examples show how to use
org.jdesktop.swingx.JXPanel#setBorder() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PushDialog.java From gameserver with Apache License 2.0 | 6 votes |
public void init() { this.setTitle("消息管理"); this.setSize(500, 300); Point p = WindowUtils.getPointForCentering(this); this.setLocation(p); this.setModal(true); this.okButton.setActionCommand(ActionName.OK.name()); this.okButton.addActionListener(this); this.cancelButton.setActionCommand(ActionName.CANCEL.name()); this.cancelButton.addActionListener(this); this.infoField.setText(""); JXPanel loginPanel = new JXPanel(new MigLayout("wrap 2, gap 10px", "[45%][55%]")); loginPanel.add(this.statusLabel, "span"); loginPanel.add(this.infoField, "span, growx"); loginPanel.setBorder(BorderFactory.createTitledBorder("PUSH")); JXPanel panel = new JXPanel(new MigLayout("wrap 1, gap 10px", "[100%]")); this.setLayout(new MigLayout("wrap 1")); panel.add(loginPanel, "growx"); panel.add(this.okButton, "gaptop 5px, span, split 3, align center"); panel.add(this.cancelButton); this.add(panel, "width 100%, height 100%"); }
Example 2
Source File: ManageAccountStatusDialog.java From gameserver with Apache License 2.0 | 5 votes |
public void init() { this.setTitle("管理账户状态"); this.setSize(320, 430); Point p = WindowUtils.getPointForCentering(this); this.setLocation(p); this.setModal(true); this.statusField.setActionCommand(CMD_STATUS_SELECT); this.statusField.addActionListener(this); this.statusField.setSelectedIndex(0); this.okButton.setActionCommand(ActionName.OK.name()); this.okButton.addActionListener(this); this.cancelButton.setActionCommand(ActionName.CANCEL.name()); this.cancelButton.addActionListener(this); this.previewButton.setActionCommand(CMD_PREVIEW); this.previewButton.addActionListener(this); JXPanel loginPanel = new JXPanel(new MigLayout("wrap 2, gap 10px", "[45%][55%]")); loginPanel.add(this.statusLabel, "sg lbl"); loginPanel.add(this.statusField, "sg fd, grow"); loginPanel.add(this.descField, "span, grow"); loginPanel.add(this.previewButton, "gaptop 5px, span, split 3, align center"); loginPanel.setBorder(BorderFactory.createTitledBorder("登陆管理")); JXPanel panel = new JXPanel(new MigLayout("wrap 1, gap 10px", "[100%]")); this.setLayout(new MigLayout("wrap 1")); panel.add(loginPanel); panel.add(this.okButton, "gaptop 5px, span, split 3, align center"); panel.add(this.cancelButton); this.add(panel, "width 100%, height 100%"); }
Example 3
Source File: ChargeDialog.java From gameserver with Apache License 2.0 | 5 votes |
public void init() { this.setTitle("充值管理"); this.setSize(900, 280); Point p = WindowUtils.getPointForCentering(this); this.setLocation(p); this.setModal(true); this.okButton.setActionCommand(ActionName.OK.name()); this.okButton.addActionListener(this); this.cancelButton.setActionCommand(ActionName.CANCEL.name()); this.cancelButton.addActionListener(this); this.infoField.setText(info); this.infoField.setEditable(false); JXPanel loginPanel = new JXPanel(new MigLayout("wrap 2, gap 10px", "[45%][55%]")); loginPanel.add(this.statusLabel, "sg lbl"); loginPanel.add(this.valueField, "sg fd, width 10%"); loginPanel.setBorder(BorderFactory.createTitledBorder("充值管理")); JXPanel panel = new JXPanel(new MigLayout("wrap 1, gap 10px", "[100%]")); this.setLayout(new MigLayout("wrap 1")); panel.add(loginPanel, "growx"); panel.add(infoField, "grow"); panel.add(this.okButton, "gaptop 5px, span, split 3, align center"); panel.add(this.cancelButton); this.add(panel, "width 100%, height 100%"); }
Example 4
Source File: TaskReloadConfigPanel.java From gameserver with Apache License 2.0 | 5 votes |
public void init() { JXPanel settingPanel = new JXPanel(); TitledBorder border = BorderFactory.createTitledBorder( BorderFactory.createEtchedBorder(), "服务器设定"); border.setTitleFont(MainFrame.BIG_FONT); settingPanel.setBorder(border); this.okButton.setActionCommand(ActionName.OK.name()); this.okButton.addActionListener(this); settingPanel.setLayout(new MigLayout("wrap 4, gap 10px, alignx center", "")); settingPanel.add(this.lblGameServer, "sg lb"); settingPanel.add(this.gameServerField, "sg fd, growx, pushx"); settingPanel.add(this.lblGamePort, "sg lb"); settingPanel.add(this.gameServerPort, "sg fd, growx, pushx"); JXPanel configPanel = new JXPanel(); TitledBorder backupBorder = BorderFactory.createTitledBorder("配置文件"); backupBorder.setTitleFont(MainFrame.BIG_FONT); configPanel.setBorder(backupBorder); configPanel.setLayout(new MigLayout("wrap 4, align center")); JXPanel collPanel = new JXPanel(); collPanel.setLayout(new MigLayout("wrap 4, align center")); collPanel.setBorder(BorderFactory.createEtchedBorder()); for ( int i=0; i<CONFIG_NAMES.length; i++ ) { String collection = CONFIG_NAMES[i]; backupCollections[i] = new JCheckBox(collection); collPanel.add(backupCollections[i], "sg checkbox"); } configPanel.add(collPanel, "align center, width 100%"); configPanel.add(this.okButton, "newline, span, split 2, alignx center, aligny bottom"); this.setLayout(new MigLayout("wrap 1")); this.add(settingPanel, "width 100%"); this.add(configPanel, "width 100%"); }
Example 5
Source File: TaskLoginPanel.java From gameserver with Apache License 2.0 | 5 votes |
public void init() { //创建工作区域 this.setLayout(new MigLayout("")); LoginManager.getInstance().reload(); this.majorVersionField.setValue(LoginManager.getInstance().getClientMajorVersion()); this.minorVersionField.setValue(LoginManager.getInstance().getClientMinorVersion()); this.configVersionField.setValue(LoginManager.getInstance().getClientConfigVersion()); this.clientVersionOKButton.setActionCommand(ActionName.OK.name()); this.clientVersionOKButton.addActionListener(this); this.bulletinField.setColumns(100); this.bulletinField.setRows(20); this.sendButton.setActionCommand(ACTION_SEND); this.sendButton.addActionListener(this); this.sendButton.setText("发送"); this.expireField.setValue(0); JXPanel versionPanel = new JXPanel(new MigLayout("wrap 4")); versionPanel.setBorder(BorderFactory.createTitledBorder("登陆管理")); versionPanel.add(clientVersionLabel, "width 25%"); versionPanel.add(majorVersionField, "width 10%"); versionPanel.add(minorVersionField, "width 10%"); versionPanel.add(configVersionLabel, "newline, width 25%"); versionPanel.add(configVersionField, "width 20%, wrap"); versionPanel.add(clientVersionOKButton, "width 10%, align center"); JXPanel bulletinPanel = new JXPanel(new MigLayout("wrap 1")); bulletinPanel.setBorder(BorderFactory.createTitledBorder("消息管理")); bulletinPanel.add(bulletinField, "grow"); bulletinPanel.add(typeField, "split 4"); bulletinPanel.add(expireField, "width 5%"); bulletinPanel.add(serverBox, ""); bulletinPanel.add(sendButton, "align center"); this.add(versionPanel, "width 100%, wrap"); this.add(bulletinPanel, "width 100%"); }
Example 6
Source File: QuickStartPanel.java From zap-extensions with Apache License 2.0 | 4 votes |
private void showNews(NewsItem newsItem) { JXPanel innerPanel = new QuickStartBackgroundPanel(); CloseButton closeButton = new CloseButton(); JPanel closePanel = new QuickStartBackgroundPanel(); closePanel.add(new JLabel(""), LayoutHelper.getGBC(0, 0, 1, 1.0D)); // Spacer closePanel.add(closeButton, LayoutHelper.getGBC(1, 0, 1, 0.0D)); closeButton.setVerticalAlignment(SwingConstants.TOP); closeButton.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { newsPanel.setVisible(false); extension.getQuickStartParam().setClearedNewsItem(newsItem.getId()); } }); JButton learnMoreButton = new JButton(Constant.messages.getString("quickstart.button.news")); learnMoreButton.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { DesktopUtils.openUrlInBrowser(newsItem.getUri()); } }); innerPanel.setBorder( BorderFactory.createTitledBorder( BorderFactory.createLineBorder(Color.RED), Constant.messages.getString("quickstart.label.news"))); innerPanel.add( new JLabel(newsItem.getText()), LayoutHelper.getGBC(0, 0, 1, 0.0D, new Insets(5, 5, 5, 5))); innerPanel.add(learnMoreButton, LayoutHelper.getGBC(1, 0, 1, 0.0D, new Insets(5, 5, 5, 5))); innerPanel.add(closeButton, LayoutHelper.getGBC(2, 0, 1, 0.0D)); newsPanel.add( new JLabel(""), LayoutHelper.getGBC(0, 0, 1, 0.5D, new Insets(5, 5, 5, 5))); // Spacer newsPanel.add(innerPanel, LayoutHelper.getGBC(2, 0, 1, 0.5D, new Insets(5, 5, 5, 5))); newsPanel.add( new JLabel(""), LayoutHelper.getGBC(3, 0, 1, 0.5D, new Insets(5, 5, 5, 5))); // Spacer newsPanel.revalidate(); }
Example 7
Source File: ManageLoginStatusDialog.java From gameserver with Apache License 2.0 | 4 votes |
public void init() { this.setTitle("管理登陆状态"); this.setSize(320, 430); Point p = WindowUtils.getPointForCentering(this); this.setLocation(p); this.setModal(true); this.statusField.setActionCommand(CMD_STATUS_SELECT); this.statusField.addActionListener(this); this.statusField.setSelectedIndex(user.getLoginStatus().ordinal()); try { Jedis jedis = AdminJedis.getInstance().getJedis(); Long ttlLong = jedis.ttl(LoginManager.getInstance().getUserPauseKey(user.getUsername())); if ( ttlLong != null && ttlLong.intValue()>0 ) { this.valueField.setValue(ttlLong.intValue()); } else { this.valueField.setValue(0); if ( user.getLoginStatus() == UserLoginStatus.PAUSE ) { this.statusField.setSelectedIndex(0); } } } catch (Exception e) { e.printStackTrace(); } this.descField.setText(user.getLoginStatusDesc()); switch ( user.getStatus() ) { case NORMAL: this.chatField.setSelectedIndex(0); break; case CHAT_DISABLE: this.chatField.setSelectedIndex(1); break; } this.okButton.setActionCommand(ActionName.OK.name()); this.okButton.addActionListener(this); this.cancelButton.setActionCommand(ActionName.CANCEL.name()); this.cancelButton.addActionListener(this); this.previewButton.setActionCommand(CMD_PREVIEW); this.previewButton.addActionListener(this); JXPanel loginPanel = new JXPanel(new MigLayout("wrap 2, gap 10px", "[45%][55%]")); loginPanel.add(this.statusLabel, "sg lbl"); loginPanel.add(this.statusField, "sg fd, grow"); loginPanel.add(this.valueField, "sg fd, grow"); loginPanel.add(this.timeUnitField, "sg fd, grow"); loginPanel.add(this.descField, "span, grow"); loginPanel.add(this.previewButton, "gaptop 5px, span, split 3, align center"); loginPanel.setBorder(BorderFactory.createTitledBorder("登陆管理")); JXPanel chatPanel = new JXPanel(new MigLayout("wrap 2, gap 10px", "[45%][55%]")); chatPanel.setBorder(BorderFactory.createTitledBorder("聊天管理")); chatPanel.add(this.chatLabel, "sg lbl"); chatPanel.add(this.chatField, "sg fd, grow"); JXPanel panel = new JXPanel(new MigLayout("wrap 1, gap 10px", "[100%]")); this.setLayout(new MigLayout("wrap 1")); panel.add(loginPanel); panel.add(chatPanel); panel.add(this.okButton, "gaptop 5px, span, split 3, align center"); panel.add(this.cancelButton); this.add(panel, "width 100%, height 100%"); }
Example 8
Source File: AddOrEditExitGameDialog.java From gameserver with Apache License 2.0 | 4 votes |
public void init() { if (!createdNew) { this.idField.setEnabled(false); } this.okButton.setActionCommand(ActionName.OK.name()); this.okButton.addActionListener(this); this.cancelButton.setActionCommand(ActionName.CANCEL.name()); this.cancelButton.addActionListener(this); if ( this.exitPojo != null ) { updateRewardPojo(); } this.resetDateButton.setActionCommand(COMMAND_RESET_DATE); this.resetDateButton.addActionListener(this); this.setSize(800, 600); this.setResizable(true); Point c = WindowUtils.getPointForCentering(this); this.setLocation(c); this.setModal(true); JXPanel pojoPanel = new JXPanel(); pojoPanel.setBorder(BorderFactory.createTitledBorder("奖励配置")); pojoPanel.setLayout(new MigLayout("wrap 4", //column "[][]30[][]", "10" )); pojoPanel.add(idLbl, "sg lbl"); pojoPanel.add(idField, "sg fd, growx"); pojoPanel.add(daysLbl, "sg lbl"); pojoPanel.add(daysField, "sg fd, growx"); pojoPanel.add(channelLbl, "sg lbl"); pojoPanel.add(channelField, "sg fd"); pojoPanel.add(startMillisLbl, "sg lbl"); pojoPanel.add(startMillisField, "sg fd"); pojoPanel.add(endMillisLbl, "sg lbl"); pojoPanel.add(endMillisField, "sg fd"); this.setLayout(new MigLayout("wrap 1, ins 5px")); this.add(pojoPanel, "width 100%, height 50%"); rewardPanel.setBorder(BorderFactory.createTitledBorder("奖励内容")); this.add(rewardPanel, "width 100%, height 50%"); this.add(okButton, "split 3, align center"); this.add(resetDateButton, ""); this.add(cancelButton, ""); }
Example 9
Source File: AddOrEditCDKeyDialog.java From gameserver with Apache License 2.0 | 4 votes |
public void init() { if (!createdNew) { this.idField.setEnabled(false); } this.idField.setColumns(20); this.okButton.setActionCommand(ActionName.OK.name()); this.okButton.addActionListener(this); this.cancelButton.setActionCommand(ActionName.CANCEL.name()); this.cancelButton.addActionListener(this); if ( this.cdkeyPojo != null ) { updateRewardPojo(); } this.resetDateButton.setActionCommand(COMMAND_RESET_DATE); this.resetDateButton.addActionListener(this); this.setSize(800, 600); this.setResizable(true); Point c = WindowUtils.getPointForCentering(this); this.setLocation(c); this.setModal(true); JXPanel pojoPanel = new JXPanel(); pojoPanel.setBorder(BorderFactory.createTitledBorder("奖励配置")); pojoPanel.setLayout(new MigLayout("wrap 4", //column "[][]30[][]", "10" )); pojoPanel.add(idLbl, "sg lbl"); pojoPanel.add(idField, "sg fd, growx"); pojoPanel.add(channelLbl, "sg lbl"); pojoPanel.add(channelField, "sg fd"); pojoPanel.add(startMillisLbl, "sg lbl"); pojoPanel.add(startMillisField, "sg fd"); pojoPanel.add(endMillisLbl, "sg lbl"); pojoPanel.add(endMillisField, "sg fd"); this.setLayout(new MigLayout("wrap 1, ins 5px")); this.add(pojoPanel, "width 100%, height 50%"); rewardPanel.setBorder(BorderFactory.createTitledBorder("奖励内容")); this.add(rewardPanel, "width 100%, height 50%"); this.add(okButton, "split 3, align center"); this.add(resetDateButton, ""); this.add(cancelButton, ""); }
Example 10
Source File: AddOrEditRewardDialog.java From gameserver with Apache License 2.0 | 4 votes |
public void init() { if (!createdNew) { this.idField.setEnabled(false); } this.idField.setColumns(20); this.okButton.setActionCommand(ActionName.OK.name()); this.okButton.addActionListener(this); this.cancelButton.setActionCommand(ActionName.CANCEL.name()); this.cancelButton.addActionListener(this); if ( this.rewardPojo != null ) { updateRewardPojo(); } this.setSize(800, 600); this.setResizable(true); Point c = WindowUtils.getPointForCentering(this); this.setLocation(c); this.setModal(true); JXPanel pojoPanel = new JXPanel(); pojoPanel.setBorder(BorderFactory.createTitledBorder("奖励配置")); pojoPanel.setLayout(new MigLayout("wrap 4", //column "[][]30[][]", "10" )); pojoPanel.add(idLbl, "sg lbl"); pojoPanel.add(idField, "sg fd, growx"); pojoPanel.add(includeLbl, "span 2 1"); pojoPanel.add(nameLbl, "sg lbl"); pojoPanel.add(nameField, "sg fd"); pojoPanel.add(includeField, "span 2 4"); pojoPanel.add(happenRatioLbl, "sg lbl"); pojoPanel.add(happenRatioField, "sg fd"); pojoPanel.add(startMillisLbl, "sg lbl"); pojoPanel.add(startMillisField, "sg fd"); pojoPanel.add(endMillisLbl, "sg lbl"); pojoPanel.add(endMillisField, "sg fd"); this.setLayout(new MigLayout("wrap 1, ins 5px")); this.add(pojoPanel, "width 100%, height 50%"); rewardPanel.setBorder(BorderFactory.createTitledBorder("奖励内容")); this.add(rewardPanel, "width 100%, height 50%"); this.add(okButton, "split 2, align center"); this.add(cancelButton, ""); }
Example 11
Source File: TaskEquipmentExportPanel.java From gameserver with Apache License 2.0 | 4 votes |
public void init() { this.goldenToPowerField.setColumns(20); this.goldenToPowerField.setText("2"); this.medalToPowerField.setText("0.4"); this.voucherToPowerField.setText("1.0"); this.yuanbaoToPowerField.setText("0.2"); this.myTable.setEnableAddRow(false); this.myTable.setEnableDelRow(true); this.myTable.setEnableRrefresh(false); this.myTable.setTableModel(model); this.exportEquipmentButton.addActionListener(this); this.exportEquipmentButton.setActionCommand(COMMAND_EXPORT_EQUIPMENT); this.importEquipmentButton.addActionListener(this); this.importEquipmentButton.setActionCommand(COMMAND_IMPORT_EQUIPMENT); this.savePriceButton.addActionListener(this); this.savePriceButton.setActionCommand(COMMAND_SAVE_PRICE); this.savePriceButton.setEnabled(false); this.saveConfigButton.addActionListener(this); this.saveConfigButton.setActionCommand(COMMAND_SAVE_CONFIG); this.saveConfigButton.setEnabled(false); this.importItemButton.addActionListener(this); this.importItemButton.setActionCommand(COMMAND_IMPORT_ITEM); this.importItemButton.setEnabled(false); this.randomMinField.setText("0"); this.randomMaxField.setText("0"); int simpleTimes = GameDataManager.getInstance().getGameDataAsInt(GameDataKey.WEAPON_INDATE_SIMPLE, 30); int normalTimes = GameDataManager.getInstance().getGameDataAsInt(GameDataKey.WEAPON_INDATE_NORMAL, 100); int solidTimes = GameDataManager.getInstance().getGameDataAsInt(GameDataKey.WEAPON_INDATE_SOLID, 200); int eternalTimes = GameDataManager.getInstance().getGameDataAsInt(GameDataKey.WEAPON_INDATE_ETERNAL, Integer.MAX_VALUE); this.simpleTimesField.setText(String.valueOf(simpleTimes)); this.normalTimesField.setText(String.valueOf(normalTimes)); this.solidTimesField.setText(String.valueOf(solidTimes)); this.eternalTimesField.setText(String.valueOf(eternalTimes)); this.simpleTimesDiscountField.setText("1.0"); this.normalTimesDiscountField.setText("3.0"); this.solidTimesDiscountField.setText("5.0"); this.eternalTimesDiscountField.setText("10.0"); JXPanel pricePanel = new JXPanel(); pricePanel.setBorder(BorderFactory.createTitledBorder("设定单位DPR对应的价格参数")); pricePanel.setLayout(new MigLayout("wrap 8")); pricePanel.add(goldenToPowerLbl, "sg lbl"); pricePanel.add(goldenToPowerField, "sg field"); pricePanel.add(medalToPowerLbl, "sg lbl"); pricePanel.add(medalToPowerField, "sg field"); pricePanel.add(voucherToPowerLbl, "sg lbl"); pricePanel.add(voucherToPowerField, "sg field"); pricePanel.add(yuanbaoToPowerLbl, "sg lbl"); pricePanel.add(yuanbaoToPowerField, "sg field"); pricePanel.add(randomRangeLbl, "sg lbl"); pricePanel.add(randomMinField, "sg field"); pricePanel.add(randomRangeToLbl, "sg lbl"); pricePanel.add(randomMaxField, "sg field"); JXPanel qualityPanel = new JXPanel(); qualityPanel.setBorder(BorderFactory.createTitledBorder("设定四种品质武器的有效次数和价格折扣")); qualityPanel.setLayout(new MigLayout("wrap 8")); qualityPanel.add(simpleTimesLbl, "sg lbl"); qualityPanel.add(simpleTimesField, "sg field"); qualityPanel.add(normalTimesLbl, "sg lbl"); qualityPanel.add(normalTimesField, "sg field"); qualityPanel.add(solidTimesLbl, "sg lbl"); qualityPanel.add(solidTimesField, "sg field"); qualityPanel.add(eternalTimesLbl, "sg lbl"); qualityPanel.add(eternalTimesField, "sg field"); qualityPanel.add(simpleTimesDiscountLbl, "sg lbl"); qualityPanel.add(simpleTimesDiscountField, "sg field"); qualityPanel.add(normalTimesDiscountLbl, "sg lbl"); qualityPanel.add(normalTimesDiscountField, "sg field"); qualityPanel.add(solidTimesDiscountLbl, "sg lbl"); qualityPanel.add(solidTimesDiscountField, "sg field"); qualityPanel.add(eternalTimesDiscountLbl, "sg lbl"); qualityPanel.add(eternalTimesDiscountField, "sg field"); this.setLayout(new MigLayout("wrap 2")); this.add(pricePanel, "span, width 100%"); this.add(qualityPanel, "span, width 100%"); this.add(exportEquipmentButton, "span, split 5, align center"); this.add(importEquipmentButton, ""); this.add(savePriceButton, ""); this.add(importItemButton, ""); this.add(saveConfigButton, ""); this.add(myTable, "newline, span, width 100%, height 80%"); }
Example 12
Source File: TaskShopDataGeneratorPanel.java From gameserver with Apache License 2.0 | 4 votes |
public void init() { this.goldenToPowerField.setColumns(20); this.goldenToPowerField.setText("2"); this.medalToPowerField.setText("0.4"); this.voucherToPowerField.setText("1.0"); this.yuanbaoToPowerField.setText("0.2"); this.myTable.setEnableAddRow(false); this.myTable.setEnableDelRow(true); this.myTable.setEnableRrefresh(false); this.myTable.setTableModel(model); this.printPriceButton.addActionListener(this); this.printPriceButton.setActionCommand(COMMAND_PRINT_PRICE); this.savePriceButton.addActionListener(this); this.savePriceButton.setActionCommand(COMMAND_SAVE_PRICE); this.saveConfigButton.addActionListener(this); this.saveConfigButton.setActionCommand(COMMAND_SAVE_CONFIG); this.importItemButton.addActionListener(this); this.importItemButton.setActionCommand(COMMAND_IMPORT_ITEM); this.randomMinField.setText("0"); this.randomMaxField.setText("0"); int simpleTimes = GameDataManager.getInstance().getGameDataAsInt(GameDataKey.WEAPON_INDATE_SIMPLE, 30); int normalTimes = GameDataManager.getInstance().getGameDataAsInt(GameDataKey.WEAPON_INDATE_NORMAL, 100); int solidTimes = GameDataManager.getInstance().getGameDataAsInt(GameDataKey.WEAPON_INDATE_SOLID, 200); int eternalTimes = GameDataManager.getInstance().getGameDataAsInt(GameDataKey.WEAPON_INDATE_ETERNAL, Integer.MAX_VALUE); this.simpleTimesField.setText(String.valueOf(simpleTimes)); this.normalTimesField.setText(String.valueOf(normalTimes)); this.solidTimesField.setText(String.valueOf(solidTimes)); this.eternalTimesField.setText(String.valueOf(eternalTimes)); this.simpleTimesDiscountField.setText("1.0"); this.normalTimesDiscountField.setText("3.0"); this.solidTimesDiscountField.setText("5.0"); this.eternalTimesDiscountField.setText("10.0"); JXPanel pricePanel = new JXPanel(); pricePanel.setBorder(BorderFactory.createTitledBorder("设定单位DPR对应的价格参数")); pricePanel.setLayout(new MigLayout("wrap 8")); pricePanel.add(goldenToPowerLbl, "sg lbl"); pricePanel.add(goldenToPowerField, "sg field"); pricePanel.add(medalToPowerLbl, "sg lbl"); pricePanel.add(medalToPowerField, "sg field"); pricePanel.add(voucherToPowerLbl, "sg lbl"); pricePanel.add(voucherToPowerField, "sg field"); pricePanel.add(yuanbaoToPowerLbl, "sg lbl"); pricePanel.add(yuanbaoToPowerField, "sg field"); pricePanel.add(randomRangeLbl, "sg lbl"); pricePanel.add(randomMinField, "sg field"); pricePanel.add(randomRangeToLbl, "sg lbl"); pricePanel.add(randomMaxField, "sg field"); JXPanel qualityPanel = new JXPanel(); qualityPanel.setBorder(BorderFactory.createTitledBorder("设定四种品质武器的有效次数和价格折扣")); qualityPanel.setLayout(new MigLayout("wrap 8")); qualityPanel.add(simpleTimesLbl, "sg lbl"); qualityPanel.add(simpleTimesField, "sg field"); qualityPanel.add(normalTimesLbl, "sg lbl"); qualityPanel.add(normalTimesField, "sg field"); qualityPanel.add(solidTimesLbl, "sg lbl"); qualityPanel.add(solidTimesField, "sg field"); qualityPanel.add(eternalTimesLbl, "sg lbl"); qualityPanel.add(eternalTimesField, "sg field"); qualityPanel.add(simpleTimesDiscountLbl, "sg lbl"); qualityPanel.add(simpleTimesDiscountField, "sg field"); qualityPanel.add(normalTimesDiscountLbl, "sg lbl"); qualityPanel.add(normalTimesDiscountField, "sg field"); qualityPanel.add(solidTimesDiscountLbl, "sg lbl"); qualityPanel.add(solidTimesDiscountField, "sg field"); qualityPanel.add(eternalTimesDiscountLbl, "sg lbl"); qualityPanel.add(eternalTimesDiscountField, "sg field"); this.setLayout(new MigLayout("wrap 2")); this.add(pricePanel, "span, width 100%"); this.add(qualityPanel, "span, width 100%"); this.add(printPriceButton, "span, split 4, align center"); this.add(savePriceButton, ""); this.add(importItemButton, ""); this.add(saveConfigButton, ""); this.add(myTable, "newline, span, width 100%, height 80%"); }