Mercurial Hosting > junotu
changeset 4:1b754922d6af
Started on button events
author | Fox |
---|---|
date | Tue, 05 Apr 2022 00:15:07 +0200 |
parents | 6e29262ee18c |
children | 81608928a9db |
files | src/junotu/TabSimpleSearch.java |
diffstat | 1 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/junotu/TabSimpleSearch.java Fri Apr 01 03:03:43 2022 +0200 +++ b/src/junotu/TabSimpleSearch.java Tue Apr 05 00:15:07 2022 +0200 @@ -2,6 +2,8 @@ import java.awt.Dimension; import java.awt.Font; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import javax.swing.JPanel; import javax.swing.Box; @@ -12,6 +14,7 @@ import javax.swing.JTextField; import javax.swing.JScrollPane; +import junotu.Main; import junotu.CardWidget; public class TabSimpleSearch extends JPanel { @@ -43,6 +46,22 @@ } scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); + + create.addActionListener( + new ActionListener() { + @Override + public void actionPerformed( ActionEvent e ) + { + buttonClickedCreate(); + } + } + ); } + + private void buttonClickedCreate() + { + Main.tabSwitch( Main.Tab.EDIT.ordinal() ); + } + }