From 7167b4341ef290d56fb96e2af10883a4b925d83b Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 26 Mar 2026 19:27:18 +0100 Subject: I found my old code! --- pbfi/pbfi-1.0/src/Frame.java | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 pbfi/pbfi-1.0/src/Frame.java (limited to 'pbfi/pbfi-1.0/src/Frame.java') diff --git a/pbfi/pbfi-1.0/src/Frame.java b/pbfi/pbfi-1.0/src/Frame.java new file mode 100755 index 0000000..30f7f3c --- /dev/null +++ b/pbfi/pbfi-1.0/src/Frame.java @@ -0,0 +1,49 @@ +/* +Copyright 2009 Sebastiano Tronto + +This file is part of PBFI (Porky's Brain F*** Interpreter). + + PBFI is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + PBFI is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with PBFI; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +import javax.swing.JFrame; +import javax.swing.JButton; +import javax.swing.JTextArea; +import javax.swing.JScrollPane; +import java.awt.BorderLayout; +import java.awt.event.*; + +public class Frame extends JFrame { + public static Main main; + public static JTextArea textArea; + public static JButton runButton; + public Frame() { + super( "Porky's Brain F*** Interpreter - v1.0" ); + main = new Main(); + textArea = new JTextArea( "Brain F*** source code here", 15, 15 ); + runButton = new JButton( "Run" ); + runButton.addActionListener( + new ActionListener() { + public void actionPerformed( ActionEvent e ) { + main.run( textArea.getText() ); + } + } + ); + setLayout( new BorderLayout() ); + add( new JScrollPane( textArea ), BorderLayout.CENTER ); + add( runButton, BorderLayout.SOUTH ); + } +} \ No newline at end of file -- cgit v1.3