import java.io.BufferedReader;
import java.io.InputStreamReader;

import javax.swing.JFrame;

public class flavor{

public static class Database{

final int IceCream = 16;
String[][] data = new String[IceCream][];

Database(String file) throws Exception
{
FileReader fr = new FileReader ("database.txt");
BufferedReader inFile = new BufferedReader(fr);
String_line = inFile.readLine();
String line;
StringTokenizer st = new StringTokenizer(line, ",");


int x = 0;
for(int i = 0; i < IceCream; i++){
for(int j=0; j<5; j++){
data[i][j] = st.nextToken();
}
line = inFile.readLine();
}
}
String[][] getData(){
return data;
}

class input {
String inStr() {
String str = new String();
BufferedReader br;

br = new BufferedReader(new InputStreamReader(System.in));

try{
str = br.readLine();
}
return str;
}
}

public static void main(String[] args){
createAndShowGUI();
}

public static void createAndShowGUI(){
//Create and show the GUI.
JFrame frame = new JFrame("Receipt");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(500,500);
frame.setLocation(200,200);
frame.setLayout(new GridLayout(2,1));

JTextArea textArea = new JTextArea(5, 20);
textArea.setEditable(false);
JScrollPane scrollPane = new JScrollPane(textArea);
frame.getContentPane().add(scrollPane);
JLabel label = new JLabel("");

textArea.setText("The Matrix should print here");

frame.pack();
frame.setVisible(true);

readAndDisplayMatrix(frame, textArea, label);
}

public static void main (string[] args){
//Variables
public static class Receipt {
private string code;
private string flavor;
private float price;
//Constructor
public produceItem(String c, String n, float p){
this.code=code;
this.flavor=flavor;
this.price=price;
}

public string getCode(){
return this.code;
}
public string getflavor(){
return this.flavor;
}
public string getPrice(){
return this.price;
}

public void setCode(string code){
this.code=code;
}

public void setflavor(string flavor){
this.flavor=flavor;
}

public void getPrice(float price){
this.price=price;
}

public string getCode(){
return code;
}

public string getflavor(){
return flavor;
}

public float getPrice(){
return price;
}
}
}
}