Esempio n. 1
0
  public void switchToPage(String pageName) {
    if (currentPage != null) remove(currentPage);

    if (pageName.equals("Fonts")) {
      currentPage = FontsPage.get();
      fontsButton.setSelected(true);
    } else if (pageName.equals("Images")) {
      currentPage = ImagesPage.get();
      imagesButton.setSelected(true);
    }

    add(currentPage, BorderLayout.CENTER);

    revalidate();
    repaint();
  }
Esempio n. 2
0
  public static void disposePages() {
    FontsPage.dispose();
    ImagesPage.dispose();

    _instance = null;
  }