| | |
| | | @Autowired |
| | | private DjJdgzShipService djJdgzShipService; |
| | | @Autowired |
| | | private ShipManageService shipManageService; |
| | | @Autowired |
| | | private Level1AddOrUpdate addOrUpdate; // 注入 AddOrupdate 实例 |
| | | |
| | | private JTable table; |
| | |
| | | List<DjJdgzShip> shipList = djJdgzShipService.getList(); |
| | | JComboBox comboBox = new JComboBox(); |
| | | JButton btnInsert = new JButton("新增"); |
| | | JButton btnShip = new JButton("X号管理"); |
| | | |
| | | topJpanel.add(comboBox); |
| | | topJpanel.add(btnInsert); |
| | | topJpanel.add(btnShip); |
| | | |
| | | comboBox.setPreferredSize(new Dimension(300, 28)); |
| | | |
| | |
| | | insert(jFrame); |
| | | } |
| | | }); |
| | | btnShip.addActionListener(new ActionListener() { |
| | | @Override |
| | | public void actionPerformed(ActionEvent e) { |
| | | jFrame.setEnabled(false); |
| | | shipManageService.createTable(jFrame); |
| | | } |
| | | }); |
| | | |
| | | JScrollPane scrollPane = new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); |
| | | scrollPane.setViewportView(table); |
| | |
| | | new JComboBoxItem(1L, "三级"), |
| | | }; |
| | | |
| | | JLabel JLabel1 = new JLabel("玄号"); |
| | | JLabel JLabel1 = new JLabel("X号"); |
| | | JComboBox<JComboBoxItem> comboBox0 = new JComboBox<>(shipList); |
| | | comboBox0.setPreferredSize(new Dimension(185, 28)); |
| | | |