@ -6,6 +6,7 @@ import java.awt.BorderLayout;
import javax.swing.JFrame ;
import javax.swing.JFrame ;
import javax.swing.JPanel ;
import javax.swing.JPanel ;
import javax.swing.border.EmptyBorder ;
import javax.swing.border.EmptyBorder ;
import javax.swing.DefaultListModel ;
import javax.swing.JSplitPane ;
import javax.swing.JSplitPane ;
import javax.swing.JButton ;
import javax.swing.JButton ;
import javax.swing.JTextField ;
import javax.swing.JTextField ;
@ -21,6 +22,7 @@ import javax.swing.border.LineBorder;
import java.awt.SystemColor ;
import java.awt.SystemColor ;
import java.awt.event.ActionListener ;
import java.awt.event.ActionListener ;
import java.awt.event.ActionEvent ;
import java.awt.event.ActionEvent ;
import ksiazka.kucharska.retrieveTest ;
public class FrmMain extends JFrame {
public class FrmMain extends JFrame {
@ -41,6 +43,8 @@ public class FrmMain extends JFrame {
private JButton btnDelRecipe ;
private JButton btnDelRecipe ;
private JButton btnLoadImg ;
private JButton btnLoadImg ;
private JLabel lblRecipeTitle ;
private JLabel lblRecipeTitle ;
private static DefaultListModel recipesListModel ;
void DeactivateAddMenu ( ) {
void DeactivateAddMenu ( ) {
btnCancel . setVisible ( false ) ;
btnCancel . setVisible ( false ) ;
@ -67,11 +71,17 @@ public class FrmMain extends JFrame {
txtTags . setEditable ( true ) ;
txtTags . setEditable ( true ) ;
lblRecipeTitle . setVisible ( false ) ;
lblRecipeTitle . setVisible ( false ) ;
}
}
public static DefaultListModel getRecipesList ( )
{
return recipesListModel ;
}
/ * *
/ * *
* Create the frame .
* Create the frame .
* /
* /
public FrmMain ( ) {
public FrmMain ( ) {
setResizable ( false ) ;
setResizable ( false ) ;
setTitle ( "Książka Kucharska v1.0" ) ;
setTitle ( "Książka Kucharska v1.0" ) ;
setDefaultCloseOperation ( JFrame . EXIT_ON_CLOSE ) ;
setDefaultCloseOperation ( JFrame . EXIT_ON_CLOSE ) ;
@ -115,7 +125,8 @@ public class FrmMain extends JFrame {
gbc_btnSearch . gridy = 0 ;
gbc_btnSearch . gridy = 0 ;
panel . add ( btnSearch , gbc_btnSearch ) ;
panel . add ( btnSearch , gbc_btnSearch ) ;
JList recipesList = new JList ( ) ;
recipesListModel = new DefaultListModel ( ) ;
JList recipesList = new JList ( recipesListModel ) ;
GridBagConstraints gbc_recipesList = new GridBagConstraints ( ) ;
GridBagConstraints gbc_recipesList = new GridBagConstraints ( ) ;
gbc_recipesList . insets = new Insets ( 0 , 0 , 5 , 0 ) ;
gbc_recipesList . insets = new Insets ( 0 , 0 , 5 , 0 ) ;
gbc_recipesList . gridwidth = 2 ;
gbc_recipesList . gridwidth = 2 ;
@ -219,5 +230,6 @@ public class FrmMain extends JFrame {
btnCancel . setBounds ( 319 , 46 , 117 , 25 ) ;
btnCancel . setBounds ( 319 , 46 , 117 , 25 ) ;
panel_2 . add ( btnCancel ) ;
panel_2 . add ( btnCancel ) ;
retrieveTest . retrieveData ( ) ;
}
}
}
}