java - How to equally split a JSplitPane? -


Then I am using Java and swing and a JSplitPane equally divided on each side . I found JSplitPane , although the window is full size and the other is smaller

  package com. Horizoner Backup; Import javax.swing. *; Import java.awt. *; Import java.awt.event. *; Import java.io * *; Public Class Men {Private JMUR Menu Menu; Private JMMenu File menu, Edit menu, Help menu; Private Zeppel left the panel, right panel; Private pocket open button; Public main () {Jpinal main card = new zpinal (new border layout (8, 8)); Menubar = new jmur (); FileMenu = new jmnu ("file"); Editmenu = new jmnu ("edit"); helpMenu = new JMU ("help"); menuBar.add (FileMenu); menuBar.add (editMenu); MenuBar.add (helpMenu); MainCard.add (menubar); leftPanel = new zpn (); rightPanel = new zpn (); JSplitPane splitPane = New JSplitPane (JSplitPane.HORIZONTAL_SPLIT, leftPanel, rightPanel); GeFrame window = new Jeffram ("pseudo-code text editor"); window.setJMenuBar (Menubar); Window.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); Add window.getContentPane () (splitPane) .; window.setSize (1280, 720); Window.setLocationRelativeTo (zero); Window.setVisible (true); } Public static zero major (string algos []) {SwingUtilities.invokeLater (new runleball) {@Override Public runs zero (new (main);}}); }}   

Enter image details here

use

  splitPane.setResizeWight (0.5);   

Please see for more information.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -