|
@ -9,13 +9,16 @@ import javax.swing.border.EmptyBorder; |
|
|
import javax.swing.JSplitPane; |
|
|
import javax.swing.JSplitPane; |
|
|
import javax.swing.JButton; |
|
|
import javax.swing.JButton; |
|
|
import javax.swing.JTextField; |
|
|
import javax.swing.JTextField; |
|
|
import java.awt.Dimension; |
|
|
|
|
|
import javax.swing.SwingConstants; |
|
|
|
|
|
import java.awt.GridLayout; |
|
|
import java.awt.GridLayout; |
|
|
import java.awt.GridBagLayout; |
|
|
import java.awt.GridBagLayout; |
|
|
import java.awt.GridBagConstraints; |
|
|
import java.awt.GridBagConstraints; |
|
|
import java.awt.Insets; |
|
|
import java.awt.Insets; |
|
|
import javax.swing.JList; |
|
|
import javax.swing.JList; |
|
|
|
|
|
import javax.swing.JTextPane; |
|
|
|
|
|
import javax.swing.JLabel; |
|
|
|
|
|
import java.awt.Font; |
|
|
|
|
|
import javax.swing.border.LineBorder; |
|
|
|
|
|
import java.awt.SystemColor; |
|
|
|
|
|
|
|
|
public class FrmMain extends JFrame { |
|
|
public class FrmMain extends JFrame { |
|
|
|
|
|
|
|
@ -30,6 +33,7 @@ public class FrmMain extends JFrame { |
|
|
* Create the frame. |
|
|
* Create the frame. |
|
|
*/ |
|
|
*/ |
|
|
public FrmMain() { |
|
|
public FrmMain() { |
|
|
|
|
|
setResizable(false); |
|
|
setTitle("Książka Kucharska v1.0"); |
|
|
setTitle("Książka Kucharska v1.0"); |
|
|
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
setBounds(100, 100, 800, 500); |
|
|
setBounds(100, 100, 800, 500); |
|
@ -65,6 +69,8 @@ public class FrmMain extends JFrame { |
|
|
|
|
|
|
|
|
JButton btnSearch = new JButton("Szukaj"); |
|
|
JButton btnSearch = new JButton("Szukaj"); |
|
|
GridBagConstraints gbc_btnSearch = new GridBagConstraints(); |
|
|
GridBagConstraints gbc_btnSearch = new GridBagConstraints(); |
|
|
|
|
|
gbc_btnSearch.anchor = GridBagConstraints.NORTH; |
|
|
|
|
|
gbc_btnSearch.fill = GridBagConstraints.HORIZONTAL; |
|
|
gbc_btnSearch.insets = new Insets(0, 0, 5, 0); |
|
|
gbc_btnSearch.insets = new Insets(0, 0, 5, 0); |
|
|
gbc_btnSearch.gridx = 1; |
|
|
gbc_btnSearch.gridx = 1; |
|
|
gbc_btnSearch.gridy = 0; |
|
|
gbc_btnSearch.gridy = 0; |
|
@ -82,6 +88,7 @@ public class FrmMain extends JFrame { |
|
|
JPanel panel_1 = new JPanel(); |
|
|
JPanel panel_1 = new JPanel(); |
|
|
GridBagConstraints gbc_panel_1 = new GridBagConstraints(); |
|
|
GridBagConstraints gbc_panel_1 = new GridBagConstraints(); |
|
|
gbc_panel_1.gridwidth = 2; |
|
|
gbc_panel_1.gridwidth = 2; |
|
|
|
|
|
gbc_panel_1.gridheight = 0; |
|
|
gbc_panel_1.insets = new Insets(0, 0, 0, 5); |
|
|
gbc_panel_1.insets = new Insets(0, 0, 0, 5); |
|
|
gbc_panel_1.fill = GridBagConstraints.BOTH; |
|
|
gbc_panel_1.fill = GridBagConstraints.BOTH; |
|
|
gbc_panel_1.gridx = 0; |
|
|
gbc_panel_1.gridx = 0; |
|
@ -94,6 +101,37 @@ public class FrmMain extends JFrame { |
|
|
|
|
|
|
|
|
JButton btnDelRecipe = new JButton("Usuń"); |
|
|
JButton btnDelRecipe = new JButton("Usuń"); |
|
|
panel_1.add(btnDelRecipe); |
|
|
panel_1.add(btnDelRecipe); |
|
|
|
|
|
|
|
|
|
|
|
JPanel panel_2 = new JPanel(); |
|
|
|
|
|
splitPane.setRightComponent(panel_2); |
|
|
|
|
|
panel_2.setLayout(null); |
|
|
|
|
|
|
|
|
|
|
|
JTextPane textPane = new JTextPane(); |
|
|
|
|
|
textPane.setEditable(false); |
|
|
|
|
|
textPane.setBounds(26, 88, 228, 126); |
|
|
|
|
|
panel_2.add(textPane); |
|
|
|
|
|
|
|
|
|
|
|
JTextPane textPane_1 = new JTextPane(); |
|
|
|
|
|
textPane_1.setEditable(false); |
|
|
|
|
|
textPane_1.setBounds(26, 254, 410, 196); |
|
|
|
|
|
panel_2.add(textPane_1); |
|
|
|
|
|
|
|
|
|
|
|
JLabel lblRecipeTitle = new JLabel("Nazwa przepisu"); |
|
|
|
|
|
lblRecipeTitle.setFont(new Font("Dialog", Font.BOLD, 18)); |
|
|
|
|
|
lblRecipeTitle.setBounds(12, 12, 442, 22); |
|
|
|
|
|
panel_2.add(lblRecipeTitle); |
|
|
|
|
|
|
|
|
|
|
|
JLabel lblIngredients = new JLabel("Składniki:"); |
|
|
|
|
|
lblIngredients.setBounds(26, 61, 70, 15); |
|
|
|
|
|
panel_2.add(lblIngredients); |
|
|
|
|
|
|
|
|
|
|
|
JLabel lblDescription = new JLabel("Opis wykonania:"); |
|
|
|
|
|
lblDescription.setBounds(26, 227, 152, 15); |
|
|
|
|
|
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); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |