Created
April 11, 2020 13:52
-
-
Save tychobrailleur/5fcba2c545cc09539b3f28e7a2a7e48e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.github.weisj.darklaf.DarkLaf; | |
import com.github.weisj.darklaf.LafManager; | |
import com.github.weisj.darklaf.theme.DarculaTheme; | |
import java.awt.Dimension; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
import javax.swing.JTabbedPane; | |
import javax.swing.SwingUtilities; | |
import javax.swing.UIManager; | |
public class TestHOMainFrame extends JFrame { | |
public static void main(String[] args) { | |
TestHOMainFrame frame = new TestHOMainFrame(); | |
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
try { | |
LafManager.setTheme(new DarculaTheme()); | |
UIManager.setLookAndFeel(DarkLaf.class.getCanonicalName()); | |
SwingUtilities.updateComponentTreeUI(frame); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} | |
// HOTabbedPane tabbedPane = new HOTabbedPane(); | |
JTabbedPane tabbedPane = new JTabbedPane(); | |
for (int i = 0; i < 5; i++) { | |
tabbedPane.addTab("Tab " + (i+1), new JPanel()); | |
tabbedPane.setPreferredSize(new Dimension(600, 400)); | |
} | |
frame.getContentPane().add(tabbedPane); | |
frame.setTitle("Example of HOTabbedPane"); | |
frame.pack(); | |
SwingUtilities.invokeLater(() -> frame.setVisible(true)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment