示例#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();
  }
示例#2
0
  public static void disposePages() {
    FontsPage.dispose();
    ImagesPage.dispose();

    _instance = null;
  }