Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Split windows in Netbeans

Tags:

I'm trying to split my windows so I can have 2 different classes or whatever on 1 screen but it will only split the window of the same class/file/whatever. I've been using netbeans for years and still can't do this.

Is this possible?

like image 350
zam Avatar asked Jun 27 '14 19:06

zam


People also ask

How to split NetBeans?

Just click on the file tab and drag to the far right or far left of the screen and it will split vertically so you can view two files side by side.

How do I open multiple windows in NetBeans?

the hack/solution consists of changing the "userdir" of NetBeans at launch time: when NetBeans detects a different "userdir" (than the already opened Netbeans' window) it will then proceed to open a new window. Now, every shortcut will launch a NetBeans instance in a different window.

How do I open two projects in NetBeans?

2 Answers. Show activity on this post. NetBeans has a feature called project groups which should provide you what you're looking for. If you right-click on the Projects pane and select Project Group , there is a menu option called New Project Group... which will allow you to create a new group.


2 Answers

You don't specifically mention which version of NetBeans you are using. I'm using version 8, and these instructions work for that version and version 7. I believe it is the same for version 6.

If you want to see two different source files on the screen at the same time (without floating), then open both source files. You will have two tabs in the editing area of the IDE. Click on the tab of one of the source files without releasing the mouse button (and without holding any additional keys), and drag toward either the right side of the editing area, or toward the bottom of the editing area (depending on whether you want them side-by-side or stacked). You will see an orange outline appear once you start dragging. If the orange box encloses the entire editing area, then the IDE thinks you want to reorder the tab. Keep dragging toward the edge (without going over) and eventually you will see the orange box change to fill either the right half or the lower half (or if you drag the other way, the left half or the top half) of the editing area. Releasing the mouse button at this point will drop the source file in that half of the editing area, leaving you with the two source files side-by-side or stacked.

Here's an example of what it looks like when stacking two source files, just before the mouse button is released:

NetBeans drag to stack source files

And here is what it looks like after releasing the mouse button:

enter image description here

If you want to have the same source file duplicated on the screen, open the single source file and follow the instructions above, only hold the CTRL key while clicking-and-dragging.

You can repeat this procedure as many times as you want (as is practical for your screen size), so that you end up with source files in several columns, several rows, or any combination thereof.

When you next open a file, it will be opened in the tab group of the currently selected source file. If you end up with a source file opened in the "wrong" tab group, just drag it to where you want it using the procedure above (allowing the orange box to outline the whole tab group area if you want to drop it in as a tab).

Additional screen shots for reference...

Reordering a tab within the same tab group:

enter image description here

Side-By-Side instead of stacked (two images):

enter image description hereenter image description here

Get as crazy as you want...

enter image description here

Create the above by dragging the second file to the lower half, the third file to the right half of the top half, and the fourth file to the right half of the lower half.

like image 188
RobertB Avatar answered Sep 21 '22 15:09

RobertB


At least in netbeans version 8.1, you can ctrl + i and write "move window". This will allow you to move the window with the arrows, it is the same as some user posted before but using the keyboard instead of the mouse (I prefer keyboard for this kind of things while I am coding).

like image 34
onlyjunior Avatar answered Sep 18 '22 15:09

onlyjunior