Bingkai Bintang ==>Java with Swing

import javax.swing.*;

class Bingkai2

{

public static void main (String[] args)

{

int n = Integer.parseInt(JOptionPane.showInputDialog(null,”Masukkan jumlah bingkai!”));

for (int i=1;i<=n ;i++ )

{

bingkai();

}

}

public static void bingkai ()

{

int i,j;

for (i=1;i<=4 ;i++ )

{

if ((i==1) || (i==4))

{

for (j=1;j1) && (i<4))

{

System.out.print("*");

for (j=1;j<=2 ;j++ )

{

System.out.print(" ");

}

System.out.print("*");

}

System.out.print("\n");

}

}

}