Skip to content

Commit

Permalink
Fixed saving bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahneugeboren committed Jul 31, 2015
1 parent 67c9b9b commit 3104c10
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
23 changes: 5 additions & 18 deletions JAuth/AuthenticatorGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public void setPassword() {
firstFrame.requestFocus();
}

public void tableBuilder(int rows) {
public void tableBuilder() {
String gridRows = "";
int j = buttons.size();
for(int i = 0; i < j; i++) {
Expand Down Expand Up @@ -266,23 +266,10 @@ public void edit() {
boxes.remove(boxes.size()-1);
}

tableBuilder(rows);
tableBuilder();

if(boxes.size() == 0) {
DefaultStyledDocument doc = new DefaultStyledDocument();
doc.setDocumentFilter(new DocumentSizeFilter(23));
JTextField name = new JTextField();
JTextField secret = new JTextField();
name.addKeyListener(new MyKeyListener(this));
secret.addKeyListener(new MyKeyListener(this));
name.setSize(160, 50);
secret.setSize(160,50);
name.setDocument(doc);
table.add(name);
table.add(secret);
boxes.add(0,name);
boxes.add(1,secret);
tableBuilder(2);
addRow();
}

JPanel bottom = new JPanel();
Expand Down Expand Up @@ -327,7 +314,7 @@ public void addRow() {
}
}
rows++;
tableBuilder(rows);
tableBuilder();
editWindow.repaint();
}
public void deleteRow() {
Expand Down Expand Up @@ -356,7 +343,7 @@ public void deleteRow() {
if(placeInList > providers.size()) {
placeInList = 0;
}
tableBuilder(rows);
tableBuilder();
placeInBoxes = -1;
}
public void save() {
Expand Down
Binary file modified JAuth_KS
Binary file not shown.
2 changes: 1 addition & 1 deletion JAuth_Save
Original file line number Diff line number Diff line change
@@ -1 +1 @@
I<=KE
�_���̪G|�u��=ks 7

0 comments on commit 3104c10

Please sign in to comment.