Search code examples
javaintellij-ideapackage

Creating two package inside one package in intellij


I'm working on Intellij IDEA about java project. However, I see a problem when I want to create new packages.So, my problem is:

>Package1
 >Package2 // (there is a problem in here)
  >Package3 

When I want to create third package, it shows Package2.Package3, but my expected look like:

>Package1
 >Package2 
  >Package3 

Is there any way to make that?


Solution

  • In Project tab (left side) you can find a settings like icon called Show option menu.. Inside this menu turn off the Flatten Packages

    You can also uncheck/turn off the Compact Middle Packages just below it, that did it for me