Questions tagged [null-layout-manager]

236 questions
0
votes
1 answer

Java jTable is not visible inside jScrollPane

Hello I'm having a problem displaying my JTable inside a JScrollPane. This is my code: table = new JTable(); table.setBounds(16, 203, 362, 16); //getContentPane().add(table); table.setShowHorizontalLines(true); …
Dunkey
  • 1,900
  • 11
  • 42
  • 72
0
votes
0 answers

Java: Determine JFrame/Window-Size in Null-Layout

I have the following java problem: I definitively have to use a null layout set by mainWindow.getContentPane().setLayout(null); with mainWindow being a JFrame. Now, I want to place objects (JLabel for example) absolutely but depending on the window…
Markus
  • 1
0
votes
2 answers

Scrolling a null layout panel

I am kinda new to Swing and I was experimenting with how I can place components with a null Layout. Here is a program where the button b3(towards the end) goes half inside the panel pan1 and half is invisible. I added a scrollpane to take pan1, and…
user3015246
  • 139
  • 1
  • 2
  • 9
0
votes
0 answers

Null layout at Netbeans

*SOLVED:I made a Jframe with a specific background that I need. I found on Youtube that if I want to have a picture for background,you have to choose Null Layout.I did it,and when I run my program then the window remains small(not at normal size) at…
user2933161
  • 33
  • 1
  • 3
  • 12
0
votes
2 answers

Issue creating Scrollable Pane with Swing

I have the following class... public class MessageFrame extends JFrame { public MessageFrame(List messages){ setLayout(null); JPanel container = new JPanel(); JScrollPane scrPane = new JScrollPane(container); …
Jackie
  • 21,969
  • 32
  • 147
  • 289
0
votes
1 answer

JSwing Split Panes won't display

I am creating a simple messenger in Java(just for learning purposes) and I am trying to have a friends tab that, on the left side is the list of friends, and the right side is the messages with the friend that you click on, but whenever I try to add…
N1ghtk1n9
  • 89
  • 3
  • 12
0
votes
3 answers

Managing dynamically added JCheckBoxes to JScrollPane

I am working on the functionality of adding JCheckBox to Panel and then adding that Panel to JScrollPane. So far i am done with adding different JCheckBox dynamically to Panel but when i add that same Panel to JScrollPane, it does not shows the…
0
votes
2 answers

Change the GUI Window size

The problem and question is in line 50-51: package exercise1; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import…
Toms Bugna
  • 502
  • 2
  • 10
  • 30
0
votes
1 answer

Java GUI JScrollPane hiding text

Currently I am trying to get a JScrollPane to work with a GUI I am creating. I currently have a textarea called consoleTextArea and I want to be able to scroll through it. Currently my code is: consoleTextArea = new…
Giardino
  • 1,367
  • 3
  • 10
  • 30
0
votes
2 answers

How to add scrollbar in JFrame with null layout?

I want to add a vertical scroll-bar on my JFrame with null layout. Is it possible or not? please help!
earthmover
  • 4,395
  • 10
  • 43
  • 74
0
votes
2 answers

adding ScrollBar to JTextArea

I want to add a scroll bar into my text area and I know the simple code for adding scroll bar but when I put the code for scroll bar the whole text area disappears! What is the problem? Here is my code: private JFrame frame; private JTextArea…
0
votes
1 answer

Add scrollPane to EditorPane(WebPage)

I added a WebPage to my JFrame when we press a button (webpage opens in same Frame). It works fine. But I would like to add a scrollPane to it, but when I add the JScrollPane jsp = new JScrollPane(jep);(jep = JEditorPane) the webpage just won't show…
3751_Creator
  • 656
  • 2
  • 8
  • 22
0
votes
2 answers

Java GridBagLayout + Absolute Layout

I am trying to make a 3 column layout, in each column i want to be able to absolute position labels and textboxes. Problem is that my label (jLabel2) never even gets displayed.. Here is my code: /** * Top JPanel (Top) */ JPanel pnlTop = new…
Alosyius
  • 8,771
  • 26
  • 76
  • 120
0
votes
1 answer

How to handle different screen size

In my application I am using one JFrame and multiple jpanels. I make the JFrame fullScreen with setExtendedState() method. In the main jFrame I load jpanels during runtime. When I load jPanel I use jPanel.setBound(0, 0, 1000, 500). This looks fine…
0
votes
0 answers

"Refresh" a JFrame with setLayout(null)

I am trying to get the JFrame to refresh as I want to add a JPanel onto a JFrame after it had been set visible. invalidate() then validate() then repaint() won't work as I don't have a layout manager. The class: import java.awt.BorderLayout; import…
zbz.lvlv
  • 3,597
  • 6
  • 34
  • 38