Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JButton AddLootButton = new JButton("Add Item");
- AddLootButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- if(StackableItemButton.isSelected())
- {
- for(int i = 0 ; i < LootTable.getRowCount() ; i++ )
- {
- if(LootTable.getValueAt(i, 0) == null )
- {
- if(LootToAdd != null)
- {
- LootTable.setValueAt(LootToAdd.getText(), i, 0);
- LootTable.repaint();
- break;
- }
- }
- }
- }
- if(NotStackableItemButton.isSelected())
- {
- for(int i = 0 ; i < LootTable.getRowCount() ; i++ )
- {
- if(LootTable.getValueAt(i, 1) == null )
- {
- if(LootToAdd != null)
- {
- LootTable.setValueAt(LootToAdd.getText(), i, 1);
- LootTable.repaint();
- break;
- }
- }
- }
- }
- }
- });
- AddLootButton.setBounds(256, 24, 89, 23);
- panel_14.add(AddLootButton);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement