Class SupportPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, Scrollable

public class SupportPanel extends ScrollablePanel
A high-salience UI component providing support links and community resources.

This panel serves as the primary gateway for users to interact with the Anahata ecosystem, providing direct access to Discord, GitHub, and official documentation. It follows the ported V2 architecture for consistent modal support and rendering.

Author:
anahata
See Also:
  • Constructor Details

    • SupportPanel

      public SupportPanel()
      Constructs a new SupportPanel.
  • Method Details

    • initComponents

      private void initComponents()
      Initializes the support panel's UI components and layout.

      Adds the "Play Arkanoid" button to the links grid, providing a recreational break for the developer.

    • createCard

      private JPanel createCard(String title, Runnable action, String description, Icon icon)
      Creates a standardized card component using a direct Icon instance.
      Parameters:
      title - The title of the card.
      action - The logic to execute when the button is clicked.
      description - A brief description of the resource.
      icon - The Icon instance to display.
      Returns:
      A panel containing the UI card.
    • createCard

      private JPanel createCard(String title, Runnable action, String description, String iconName)
      Overload to support loading icons by resource name from the classpath.
      Parameters:
      title - The title of the card.
      action - The logic to execute.
      description - Description text.
      iconName - Resource name of the icon.
      Returns:
      The card panel.
    • openWebpage

      private void openWebpage(String url)
      Dispatches a URL request to the default system browser.

      Utilizes Desktop.browse(URI) to open web-based resources. Includes error handling and user feedback via JOptionPane in case of hardware or OS-level dispatch failures.

      Parameters:
      url - The target URL to open.