title: How can I create a Swing menu bar that appears at the very top of my program?
body: <p>Coding Languages: I am coding in Kotlin with Swing, but I can transcode it to Kotlin if you provide any Java code. I know both Kotlin and Java so I will be able to understand either. Additionally, I am coding my application in Swing with at this stage, no libraries.</p>
  
  <p>I want to create a menu bar for my application at the very top of the application, in the top bar. I have searched for this and found various menu bar tutorials but every single one of them resulted in a bar with options <strong>below</strong> both the application icon and the applications minimize, maximize, and close buttons.</p>
  
  <p>Even the official <a href="https://docs.oracle.com/javase/tutorial/uiswing/components/menu.html" rel="nofollow noreferrer">Java Documentation on the matter</a> only results in the image below.
  <a href="https://i.stack.imgur.com/VZN7D.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VZN7D.png" alt="An image of the menu bar below the top bar of the application"></a></p>
  
  <p>There are many other tutorials, but all of them only show how to create a menu bar below the actual top of the application. I thought that this was just because apps can't change what's on the top bar, but then I realized that Chrome, the very application I am using right now, doesn't just show a title, icon, and three buttons. It has a whole tab system. All of the Microsoft Office applications have extra buttons of the top bar, although they have an additional bar for menu items anyways. A screenshot is provided, showing an autosave button and a few extras. (I removed my details)
  <a href="https://i.stack.imgur.com/ZaUOx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZaUOx.png" alt="A screenshot of Microsoft Word"></a></p>
  
  <p>For a perfect example of what I want mine to look like, I've provided a screenshot of the Jetbrains' IntelliJ IDEA. IntelliJ was coded in Swing with no libraries, as far as I know, so whatever they did must be possible with just Swing. I want a bunch of options to be on the very top bar, just like in the screenshot below.
  <a href="https://i.stack.imgur.com/cBBw9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cBBw9.png" alt="A screenshot of IntelliJ IDEA"></a></p>
  
  <p>Just in case there is any ambiguity on what I am talking about, I want my top bar, the one with the close button, maximize and minimize buttons, icon, and app title to also include other options. In IntelliJ's case, the inclusion of File, Edit, View, Navigate, etc. Based on what my application is for, I might include File, Save, Undo, Options, and Help all with dropdowns to select items in lists. (Ex. File might have Open, Open Recent, New, Settings, etc. in a dropdown menu after hovering over it)</p>
  
  <p>Any links to how to do this would be greatly appreciated. Again, I am coding my project in Kotlin, but I know Java as well so I will take answers from both.</p>