Create Navigation Drawer Menu using Java Swing with FlatLaf

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • In this Java Swing tutorial, we'll walk through the step-by-step process of creating a sleek drawer menu for your Swing application using the FlatLaf look and feel. A drawer menu is a modern and space-efficient way to organize navigation within your application. We'll cover the implementation details, customization options, and demonstrate how FlatLaf enhances the visual appeal of your Java GUI. Whether you're a beginner or seasoned Java developer, this tutorial will empower you to enhance your Swing projects with a contemporary touch.
    🔔 Subscribe for more Java Swing tutorials and updates!
    If you find this tutorial helpful, don't forget to like, share, and subscribe for more content. Feel free to leave your questions and feedback in the comments section.
    🔗 Drawer : github.com/DJ-...
    🔗 Project Source code : github.com/DJ-...
    🚀 For support me join now
    / @laingraven

Komentáře • 61

  • @geraldmills3100
    @geraldmills3100 Před 9 měsíci +2

    Please continue with what you’re doing you are empowering a lot of people. Thank you

  • @mohammedak6689
    @mohammedak6689 Před 10 měsíci +1

    Your way for coding is so clean and simple 💯
    the most important part is the menuValidation Method we can do user permissions by hiding or show specifics menus according to predefined privileges to user.👍

  • @juanrodrigotapiamamani31

    a query how do you make the items have semi-curved lines?

  • @ahmadsoft9704
    @ahmadsoft9704 Před 9 měsíci +1

    May God reward you well

  • @inmentor8352
    @inmentor8352 Před 2 měsíci

    How can i change tabs from a TabbedPane with the panel?

  • @mohammedal-mutairi6814
    @mohammedal-mutairi6814 Před 7 měsíci +1

    Great work
    I hope you collect your works in one .jar filte so that we can your magnifcent swing component

  • @carlabad9414
    @carlabad9414 Před 4 měsíci

    Hello how can i add function to Drawer item
    in displaying tab1 tab2 tab3

  • @aliveoceans
    @aliveoceans Před 9 měsíci

    Thanks for all your wonderfull videos.. Some day could you also try to make something out of JavaFX?

  • @anassanass881
    @anassanass881 Před 7 měsíci

    And what about class SimpleDrawerBuilder , footer …… i can’t import ???

  • @andersonferreira5836
    @andersonferreira5836 Před 4 měsíci

    Teacher,
    See if you can list the classes in the sequence in which the Project evolves. There are times when I don't know which part of the Project you are doing.

  • @jorgegambini
    @jorgegambini Před 10 měsíci +1

    Hello Raven.
    First of all, thank you as always for your great contributions. They are fantastic. And as I always say, they keep Swing alive despite the passage of time.
    I take advantage of this place to ask you if in the future you can teach us how to achieve, from a class that extends JPanel, place a JCombobox that lists the objects of any Entity, and next to the combo a JButton that calls another JPanel, which allows managing the CRUD of said entity. After the creation of an object of said entity, the CRUD JPanel must be closed and the JCombox of the first JPanel should add the Object that was created. It would be very useful to me since it is difficult for me to transfer data between panels and manage its visibility. Best regards

    • @eduardogz1422
      @eduardogz1422 Před 8 měsíci

      The backend takes care of that, ra ven only teaches design.

  • @ulkeinceleme
    @ulkeinceleme Před 3 měsíci

    Great video dude, thanx for all.
    How can i bottom:0 SimpleFooter datas, now is centered

    • @ulkeinceleme
      @ulkeinceleme Před 3 měsíci

      And how can i get selected Menu title ?

    • @ulkeinceleme
      @ulkeinceleme Před 3 měsíci

      wrap,bottom 0 is working fine :)

  • @great-escanor
    @great-escanor Před 10 měsíci +1

    Great video. Thanks for using NetBeans again. I have replaced the SVG icons but it don't work, where can I download SVG like yours?

    • @LaingRaven
      @LaingRaven  Před 10 měsíci +1

      Thank you for support.
      I am using Icons8 app from google, but it's not free for svg.
      Your svg don't work by show the red rectangle ?, make sure you set the name and the location of icon is correct.

    • @great-escanor
      @great-escanor Před 10 měsíci

      @@LaingRaven It looks over sized, it doesn't fit in the menu item. I'll try with SVG from another site, thanks!

    • @LaingRaven
      @LaingRaven  Před 10 měsíci +1

      The svg Icon size in this project is 48, so am use flatsvg icon scale 0.45f

    • @great-escanor
      @great-escanor Před 10 měsíci +2

      @@LaingRaven thanks a lot!

  • @heheh8877
    @heheh8877 Před 4 měsíci

    why cant i add menus to .setMenus(menus) it only says that Strings [][] cannot convert into menu type

    • @LaingRaven
      @LaingRaven  Před 4 měsíci

      We updated pls check this github.com/DJ-Raven/swing-glasspane-popup/pull/3

  • @nurulwulansari1540
    @nurulwulansari1540 Před 6 měsíci

    How do I make sure that the menu drawer cannot be hidden, always visible ?
    and How can I add a new JPanel without extending TabbedForm ?

  • @mafenyeholuswenyo7759
    @mafenyeholuswenyo7759 Před 5 měsíci

    I have a question! How do I customize that drawer, what if I want the drawer only to be green in dark or light mode, and also to put the drawer on top or on the right or the panel.

    • @LaingRaven
      @LaingRaven  Před 5 měsíci +1

      To change drawer background pls look this sample : github.com/DJ-Raven/swing-glasspane-popup/blob/2c8124428a2bc3cb91dbb24cbc15205c2d74a390/src/test/java/test/MyDrawerBuilder.java#L140

    • @mafenyeholuswenyo7759
      @mafenyeholuswenyo7759 Před 5 měsíci

      @@LaingRaven so I'm trying to use the drawer for different users on the same app, I tried installing it on the panel but it's giving an error, is this possible in any way or should I just have different jFrames for each user

  • @iagoocs
    @iagoocs Před 9 měsíci

    You are insane bro

  • @dazzlepelobello
    @dazzlepelobello Před 9 měsíci

    nice tutorial bro,
    idlike to ask a question on how to add forms when the index clicked

  • @Fadeln
    @Fadeln Před 9 měsíci

    hello, how do i add new form or add some new login screen? i want to mix it with previous chat application that you made before

  • @adhimarnaek1924
    @adhimarnaek1924 Před 9 měsíci

    can i ask u , how to make the border radius beside the frame UI ?

  • @SaugatShahiThakuri
    @SaugatShahiThakuri Před 9 měsíci

    Hey I want your help please, I can't find a way to create file with .properties extension in raven.themes just how you did as soon as I am working on with jdk 21 and I think the new version is missing that how to do it?
    I have to work on my college projects so do help me please!

    • @LaingRaven
      @LaingRaven  Před 9 měsíci +1

      If you using netbean right click on the package you want to create -> New -> Other... -> In "Category" list select Orther then at the right side You will see the Properties File

  • @ruanalves7208
    @ruanalves7208 Před 10 měsíci

    I ran it on my Java 8. And it gave the error "C:\Users\ferre\OneDrive\Documentos\NetBeansProjects
    aven-dashboard-main\src
    aven\drawer\MyDrawerBuilder.java:3: error: cannot access SimpleDrawerBuilder"

    • @LaingRaven
      @LaingRaven  Před 10 měsíci

      I has updated on my github, you can replace miglayout library and glasspane popup, I has build it support jdk 8

  • @Katsuuuqt
    @Katsuuuqt Před 4 měsíci

    How to install swing glasspane popup on Maven? shows error in pom.xml

    • @LaingRaven
      @LaingRaven  Před 4 měsíci

      You use Netbean or IntelliJ ?

    • @Katsuuuqt
      @Katsuuuqt Před 4 měsíci

      @@LaingRaven I use netbeans, I'd like to use the dependency

    • @LaingRaven
      @LaingRaven  Před 4 měsíci

      1. Copy `swing-glasspane-popup-1.5.0.jar` to your project
      2. Go to netbean project
      - right click on Dependencies and select `Add Dependency...`
      - input `Group ID`, `Artifact ID`, `Version` and click Add
      3. You will see `swing-glasspane-popup-1.5.0.jar` in dependencies
      - right click on it and select `Manually install artifact`
      - Browse to the jar file and select

    • @Katsuuuqt
      @Katsuuuqt Před 4 měsíci

      @@LaingRaven I got it working now, Thanks a lot!

    • @Katsuuuqt
      @Katsuuuqt Před 4 měsíci

      @@LaingRaven setIcon AvatarIcon only shows white image, is there any fix for this?

  • @ZeeTech21
    @ZeeTech21 Před 9 měsíci

    hi raven, can you create a responsive desktop application. thanks

    • @LaingRaven
      @LaingRaven  Před 9 měsíci

      Using miglayout, you can check this : devdoc.net/javamisc/miglayout/whitepaper.html

  • @riotskipnotzzxdprotm1699
    @riotskipnotzzxdprotm1699 Před 10 měsíci

    Como se podría hacer el menú con base de datos?

  • @AnyThink5
    @AnyThink5 Před 9 měsíci

    when i'm using this in 2 different jframe it got error, how do i fix it
    GlassPanePopup.install(this);
    Drawer.getInstance().setDrawerBuilder(new DrawerNavigationAdmin(this));

  • @mafenyeholuswenyo7759
    @mafenyeholuswenyo7759 Před 5 měsíci

    Im getting an error when trying to add menus to the drawer, this is the error, "Java\jdk-21\bin\java.exe' '@C:\Users\mafenyeho hollet\AppData\Local\Temp\cp_9ozcyojhac4zhzv1n23rhr0ep.argfile' 'App'
    Exception in thread "main" java.lang.Error: Unresolved compilation problem:
    The method setMenus(MenuItem[]) in the type SimpleMenuOption is not applicable for the arguments (String[][])
    at MyDrawerBuilder.getSimpleMenuOption(MyDrawerBuilder.java:47)
    at raven.drawer.component.SimpleDrawerBuilder.(SimpleDrawerBuilder.java:27)
    at MyDrawerBuilder.(MyDrawerBuilder.java:6)
    at App.main(App.java:24)
    "please help

    • @LaingRaven
      @LaingRaven  Před 5 měsíci +2

      For create menu Item has updated pls check this : github.com/DJ-Raven/swing-glasspane-popup/pull/3

    • @mafenyeholuswenyo7759
      @mafenyeholuswenyo7759 Před 5 měsíci

      Thank you so much! It'd be so nice of you to have a telegram, whatsapp or Instagram group where you'll be addressing our issues.

    • @mafenyeholuswenyo7759
      @mafenyeholuswenyo7759 Před 5 měsíci

      Also if you don't mind, do a tutorial on how to create these libraries and on how to use the flatlaf theme editor