So I am trying to make a quick way to create java awt projects, and I keep having an error and it doesn't run
This is in my .bash_profile
source $1
if ( "$addButton" not = $NULL ) then
echo 'import java.awt.*;
class window extends Frame {
window(){
Button b=new Button("'${addButton[4]}'");
b.setBounds('${addButton[0]}','${addButton[1]}','${addButton[2]}','${addButton[3]}');
add(b);
setSize('$width','$height');
setLayout(null);
setVisible(true);
}
public static void main(String args[]){
window f=new window();
}}' > window.java
fi
if ( "$blank" = "true" ) then
echo 'import java.awt.*;
class window extends Frame {
window(){
setSize('$width','$height');
setLayout(null);
setVisible(true);
}
public static void main(String args[]){
window f=new window();
}}' > window.java
fi
javac window.java
java window.java
rm -rf button.sh
rm -rf window.class
rm -rf window.java
}
source Window.sh
This is the Window.sh file
Im trying to make the last line into a runnable arrary cause I cant make objects and I didnt want to make tons of variables for a supper simpe task
height="500"
addButton=( "10" "40" "200" "40" "Hello, World")```