Test wypełniania komponentów
This commit is contained in:
@@ -24,5 +24,6 @@
|
|||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="lib" path="miglayout15-swing.jar" sourcepath="miglayout-src.zip"/>
|
<classpathentry kind="lib" path="miglayout15-swing.jar" sourcepath="miglayout-src.zip"/>
|
||||||
<classpathentry kind="lib" path="forms-1.3.0.jar" sourcepath="forms-1.3.0-src.zip"/>
|
<classpathentry kind="lib" path="forms-1.3.0.jar" sourcepath="forms-1.3.0-src.zip"/>
|
||||||
|
<classpathentry kind="lib" path="D:/Documents and Settings/kozak/Pulpit/sqlite-jdbc-3.7.2.jar" sourcepath="D:/Documents and Settings/kozak/Pulpit/sqlite-jdbc-3.7.2-javadoc.jar"/>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|||||||
@@ -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);
|
||||||
@@ -68,6 +72,12 @@ public class FrmMain extends JFrame {
|
|||||||
lblRecipeTitle.setVisible(false);
|
lblRecipeTitle.setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static DefaultListModel getRecipesList()
|
||||||
|
{
|
||||||
|
return recipesListModel;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create the frame.
|
* Create the frame.
|
||||||
*/
|
*/
|
||||||
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user