Skip to content

Commit

Permalink
added tool tip text
Browse files Browse the repository at this point in the history
  • Loading branch information
npeersab committed Jan 8, 2017
1 parent 9078fe1 commit b1c20d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/ToolBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ public ToolBar(MainFrame parent) {
newButton.setBorderPainted(false);
Insets marginInsets = new Insets(4, 4, 4, 4);
newButton.setMargin(marginInsets);
newButton.setToolTipText("Create new file");
newButton.addActionListener(e -> parent.newFile());
add(newButton, bagConstraints);

// create open button
openButton = new JButton(new ImageIcon(ImgSrc.getOpenFileIcon()));
openButton.setBorderPainted(false);
openButton.setMargin(marginInsets);
openButton.setToolTipText("Open existing file");
openButton.addActionListener(e -> parent.openFile());
bagConstraints.gridx++;
add(openButton, bagConstraints);
Expand All @@ -48,6 +50,7 @@ public ToolBar(MainFrame parent) {
saveButton.setBorderPainted(false);
saveButton.setMargin(marginInsets);
saveButton.setEnabled(false);
saveButton.setToolTipText("Save file");
saveButton.addActionListener(e -> parent.save());
bagConstraints.gridx++;
add(saveButton, bagConstraints);
Expand All @@ -58,6 +61,7 @@ public ToolBar(MainFrame parent) {
saveAsButton.setBorderPainted(false);
saveAsButton.setMargin(marginInsets);
saveAsButton.setEnabled(false);
saveAsButton.setToolTipText("Save as new file");
saveAsButton.addActionListener(e -> parent.saveAs());
bagConstraints.gridx++;
add(saveAsButton, bagConstraints);
Expand Down

0 comments on commit b1c20d9

Please sign in to comment.