I'm adding a JLabel (pop_up) to a JFrame, but it doesn't show until the frame is resized.The program is to get users inputs for different search functions. The bit I'm struggling on is the below, as the pop_up JLabel isn't showing.
enter.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
if(table_search.getText().equals("Table") || column.getText().equals("Column") || search.getText().equals("Search")) {
JLabel pop_up = new JLabel("You haven't changed one or more of the text fields.");
pop_up.setBounds(240, 184, 350, 40);
frame.add(pop_up);
}
else {
String txtTable = table_search.getText();
String txtColumn = column.getText();
String txtSearch = search.getText();
table_search.setText("");
column.setText("");
search.setText("");
}
}
});