custom round skin gui

前端 未结 2 533
粉色の甜心
粉色の甜心 2020-12-11 14:11

In looking for a starting place to how to create a round interface. I have tried looking into the docs and tried looking into other plugins for Eclipse. I\'m just starting t

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-11 14:57

    Call the setOpacity method on your JFrame. More details here: http://java-demos.blogspot.com/2012/09/how-to-create-shaped-jframes-in-java.html

    Other options for Java 6 and Java 7: click here for examples in another solution

    JFrame frame = new JFrame();
    frame.setUndecorated(true);
    AWTUtilities.setWindowShape(frame, new Ellipse2D.Double(0, 0, 100, 100));
    

    Not to be rude, but you really could have found this if you spent 5 minutes Googling or searching on Stack Overflow...

    If you really want to learn Java GUI's, you should spend some time studying AWT, Swing, or JavaFX, the core Java libraries for doing GUI work, and basic objects like JFrame and JWindow, and creating menus, buttons, ActionListeners and layouts.

提交回复
热议问题