|
@ -19,6 +19,8 @@ import javax.swing.JLabel; |
|
|
import java.awt.Font; |
|
|
import java.awt.Font; |
|
|
import javax.swing.border.LineBorder; |
|
|
import javax.swing.border.LineBorder; |
|
|
import java.awt.SystemColor; |
|
|
import java.awt.SystemColor; |
|
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
|
|
|
|
public class FrmMain extends JFrame { |
|
|
public class FrmMain extends JFrame { |
|
|
|
|
|
|
|
@ -27,7 +29,7 @@ public class FrmMain extends JFrame { |
|
|
*/ |
|
|
*/ |
|
|
private static final long serialVersionUID = 2634383304749703669L; |
|
|
private static final long serialVersionUID = 2634383304749703669L; |
|
|
private JPanel contentPane; |
|
|
private JPanel contentPane; |
|
|
private JTextField txtWpiszTytutagi; |
|
|
|
|
|
|
|
|
private JTextField txtSearch; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Create the frame. |
|
|
* Create the frame. |
|
@ -57,15 +59,15 @@ public class FrmMain extends JFrame { |
|
|
gbl_panel.rowWeights = new double[]{0.0, 1.0, 0.0}; |
|
|
gbl_panel.rowWeights = new double[]{0.0, 1.0, 0.0}; |
|
|
panel.setLayout(gbl_panel); |
|
|
panel.setLayout(gbl_panel); |
|
|
|
|
|
|
|
|
txtWpiszTytutagi = new JTextField(); |
|
|
|
|
|
txtWpiszTytutagi.setText("wpisz tytuł/tagi..."); |
|
|
|
|
|
GridBagConstraints gbc_txtWpiszTytutagi = new GridBagConstraints(); |
|
|
|
|
|
gbc_txtWpiszTytutagi.insets = new Insets(0, 0, 5, 5); |
|
|
|
|
|
gbc_txtWpiszTytutagi.fill = GridBagConstraints.HORIZONTAL; |
|
|
|
|
|
gbc_txtWpiszTytutagi.gridx = 0; |
|
|
|
|
|
gbc_txtWpiszTytutagi.gridy = 0; |
|
|
|
|
|
panel.add(txtWpiszTytutagi, gbc_txtWpiszTytutagi); |
|
|
|
|
|
txtWpiszTytutagi.setColumns(10); |
|
|
|
|
|
|
|
|
txtSearch = new JTextField(); |
|
|
|
|
|
txtSearch.setText("wpisz tytuł/tagi..."); |
|
|
|
|
|
GridBagConstraints gbc_txtSearch = new GridBagConstraints(); |
|
|
|
|
|
gbc_txtSearch.insets = new Insets(0, 0, 5, 5); |
|
|
|
|
|
gbc_txtSearch.fill = GridBagConstraints.HORIZONTAL; |
|
|
|
|
|
gbc_txtSearch.gridx = 0; |
|
|
|
|
|
gbc_txtSearch.gridy = 0; |
|
|
|
|
|
panel.add(txtSearch, gbc_txtSearch); |
|
|
|
|
|
txtSearch.setColumns(10); |
|
|
|
|
|
|
|
|
JButton btnSearch = new JButton("Szukaj"); |
|
|
JButton btnSearch = new JButton("Szukaj"); |
|
|
GridBagConstraints gbc_btnSearch = new GridBagConstraints(); |
|
|
GridBagConstraints gbc_btnSearch = new GridBagConstraints(); |
|
@ -97,6 +99,10 @@ public class FrmMain extends JFrame { |
|
|
panel_1.setLayout(new GridLayout(0, 2, 0, 0)); |
|
|
panel_1.setLayout(new GridLayout(0, 2, 0, 0)); |
|
|
|
|
|
|
|
|
JButton btnAddRecipe = new JButton("Dodaj"); |
|
|
JButton btnAddRecipe = new JButton("Dodaj"); |
|
|
|
|
|
btnAddRecipe.addActionListener(new ActionListener() { |
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
panel_1.add(btnAddRecipe); |
|
|
panel_1.add(btnAddRecipe); |
|
|
|
|
|
|
|
|
JButton btnDelRecipe = new JButton("Usuń"); |
|
|
JButton btnDelRecipe = new JButton("Usuń"); |
|
@ -106,15 +112,15 @@ public class FrmMain extends JFrame { |
|
|
splitPane.setRightComponent(panel_2); |
|
|
splitPane.setRightComponent(panel_2); |
|
|
panel_2.setLayout(null); |
|
|
panel_2.setLayout(null); |
|
|
|
|
|
|
|
|
JTextPane textPane = new JTextPane(); |
|
|
|
|
|
textPane.setEditable(false); |
|
|
|
|
|
textPane.setBounds(26, 88, 228, 126); |
|
|
|
|
|
panel_2.add(textPane); |
|
|
|
|
|
|
|
|
JTextPane txtIngredients = new JTextPane(); |
|
|
|
|
|
txtIngredients.setEditable(false); |
|
|
|
|
|
txtIngredients.setBounds(26, 88, 228, 126); |
|
|
|
|
|
panel_2.add(txtIngredients); |
|
|
|
|
|
|
|
|
JTextPane textPane_1 = new JTextPane(); |
|
|
|
|
|
textPane_1.setEditable(false); |
|
|
|
|
|
textPane_1.setBounds(26, 254, 410, 196); |
|
|
|
|
|
panel_2.add(textPane_1); |
|
|
|
|
|
|
|
|
JTextPane txtDescription = new JTextPane(); |
|
|
|
|
|
txtDescription.setEditable(false); |
|
|
|
|
|
txtDescription.setBounds(26, 254, 410, 196); |
|
|
|
|
|
panel_2.add(txtDescription); |
|
|
|
|
|
|
|
|
JLabel lblRecipeTitle = new JLabel("Nazwa przepisu"); |
|
|
JLabel lblRecipeTitle = new JLabel("Nazwa przepisu"); |
|
|
lblRecipeTitle.setFont(new Font("Dialog", Font.BOLD, 18)); |
|
|
lblRecipeTitle.setFont(new Font("Dialog", Font.BOLD, 18)); |
|
@ -129,9 +135,9 @@ public class FrmMain extends JFrame { |
|
|
lblDescription.setBounds(26, 227, 152, 15); |
|
|
lblDescription.setBounds(26, 227, 152, 15); |
|
|
panel_2.add(lblDescription); |
|
|
panel_2.add(lblDescription); |
|
|
|
|
|
|
|
|
JLabel lblNewLabel_3 = new JLabel(""); |
|
|
|
|
|
lblNewLabel_3.setBorder(new LineBorder(SystemColor.textHighlightText)); |
|
|
|
|
|
lblNewLabel_3.setBounds(272, 88, 164, 126); |
|
|
|
|
|
panel_2.add(lblNewLabel_3); |
|
|
|
|
|
|
|
|
JLabel imgRecipe = new JLabel(""); |
|
|
|
|
|
imgRecipe.setBorder(new LineBorder(SystemColor.textHighlightText)); |
|
|
|
|
|
imgRecipe.setBounds(272, 88, 164, 126); |
|
|
|
|
|
panel_2.add(imgRecipe); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |