W1R6 – Adding Additional Tabbed Panes for data in the 'userprofile.csv' file -- started work on csv reader.
This commit is contained in:
1 parent
db3e4dc327
commit
17072def2f
1 file changed
+21
-4
@@ -17,7 +17,21 @@ import java.awt.event.*;
|
|||||||
public class MainViewer {
|
public class MainViewer {
|
||||||
public JFrame viewer;
|
public JFrame viewer;
|
||||||
|
|
||||||
public int a = 3; // this represents a value that is to declare how many rows are to be made
|
public int a = 3; // this represents a value that is to declare how many rows are to be made -- to be changed by the amount of lines in csv.
|
||||||
|
|
||||||
|
// start of reader creation
|
||||||
|
|
||||||
|
public String Reader()
|
||||||
|
{
|
||||||
|
String text = "Default Text -- no reading done.";
|
||||||
|
//hi
|
||||||
|
|
||||||
|
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// end of reader
|
||||||
|
|
||||||
private void CreateRow(int count, JPanel jp, String Pname) // Function to create a row // holds all the data of a row in the grid layout below.
|
private void CreateRow(int count, JPanel jp, String Pname) // Function to create a row // holds all the data of a row in the grid layout below.
|
||||||
{
|
{
|
||||||
@@ -27,7 +41,7 @@ public class MainViewer {
|
|||||||
|
|
||||||
// Temporary row distinguishing rename
|
// Temporary row distinguishing rename
|
||||||
|
|
||||||
String name = "Row " + row + " Name";
|
String name = Reader();
|
||||||
|
|
||||||
// end of temporary row rename
|
// end of temporary row rename
|
||||||
|
|
||||||
@@ -38,7 +52,10 @@ public class MainViewer {
|
|||||||
jp.add(JR);
|
jp.add(JR);
|
||||||
jp.add(JEdit);
|
jp.add(JEdit);
|
||||||
jp.add(JDelete);
|
jp.add(JDelete);
|
||||||
|
|
||||||
|
|
||||||
|
// below are action listeners
|
||||||
|
|
||||||
System.out.println("Row number: "+ row + " Has been created!");
|
System.out.println("Row number: "+ row + " Has been created!");
|
||||||
|
|
||||||
ActionListener EditListener = e -> {
|
ActionListener EditListener = e -> {
|
||||||
@@ -110,7 +127,7 @@ public class MainViewer {
|
|||||||
{
|
{
|
||||||
viewer = new JFrame();
|
viewer = new JFrame();
|
||||||
viewer.setTitle("User Profile Builder");
|
viewer.setTitle("User Profile Builder");
|
||||||
viewer.setSize(500,400);
|
viewer.setSize(800,500);
|
||||||
viewer.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
viewer.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
|
|
||||||
JTabbedPane JT = new JTabbedPane();
|
JTabbedPane JT = new JTabbedPane();
|
||||||
|
|||||||
Reference in new issue
Block a user