Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

G4P - button to open new window

$
0
0

Hi, I would like to create a button, when pressed on, will create a new window and disable the button. When the window is closed, the button will be enabled again. How can I do that? This is my code:

void handleButtonEvents(GButton button, GEvent event) 
{

  if (event == GEvent.CLICKED) 
  {
      createWindows();

  }// if
}

void createWindows() 
{
  window = new GWindow(this, "Help", 500, 50, 477, 538, false, JAVA2D);
  window.setBackground(help);
  window.setActionOnClose(GWindow.CLOSE_WINDOW);

}// createWindow

Viewing all articles
Browse latest Browse all 2896

Trending Articles