So I have a program that at the start only contains an 'add movie' button at the bottom of the frame. Above it I inserted a scrollpane. I also made a seperate JPanel form which contains labels and textfields where you have to input the data of the movie. Every time I click the 'add'-button I want a form to appear inside the scrollpane (next to previously made forms).
So I figured I just needed to do this:
private void AddMovieButtonActionPerformed(java.awt.event.ActionEvent evt) {
MovieForm movie = new MovieForm();
MovieScrollPane.add(movie);
}
But nothing new appears.
I tried validate() and repaint(), but so far these don't seem to work. I made the interface in Eclipse btw.
Anyone who can help me? Thanks anyway!