I was putting simple loading animation to my previous code but I can't fine a way to begin new line when its showing the result.
JFrame frame = new JFrame("Max");
ImageIcon loading = new ImageIcon("ajax-loader.gif");
frame.add(new JLabel("Processing to Result \n Result of Maximum is : "+max, loading,
JLabel.CENTER));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400, 300);
frame.setVisible(true);
I also try to use newline and %n but both does not work.