I am making a simple bible reader, and I want to have a fullscreen option. By default, the frame is maximized, but the frame is there. I have a method, setFullScreen
, that removes decoration. However, it does not seem to update after being initialized. Is there a way around this?
setFullScreen
method:
public void setFullScreen() {
mainFrame.setUndecorated(true);
}
Part of the main
method
UI book = new UI();
book.setLabelText(1);
book.setFullScreen();
At the same time, setLabelText
will behave similarly; once I set it the first time, I can't change it.