Wrap the label text in <html>...</html>
tags...

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
public class Main {
public static void main(String[] args) {
new Main();
}
public Main() {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
JFrame frame = new JFrame();
frame.add(new TestPane());
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
});
}
public class TestPane extends JPanel {
public TestPane() {
setLayout(new GridBagLayout());
JLabel lblloanform = new JLabel("Loan Application Form");
lblloanform.setBorder(new EmptyBorder(8, 8, 8, 8));
lblloanform.setFont(new Font("Italic", Font.BOLD, 25));
JPanel pnl1 = new JPanel(new BorderLayout());
pnl1.setBorder(new EmptyBorder(8, 8, 8, 8));
pnl1.setBackground(Color.cyan);
JLabel lbldescription = new JLabel("<html>Please fill in all needed information in the loan application form below to request a loan from your organization. Information regarding income assets are requested for qualification</html>");
lbldescription.setVerticalAlignment(JLabel.TOP);
pnl1.add(lbldescription);
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridwidth = GridBagConstraints.REMAINDER;
gbc.weightx = 1;
gbc.fill = GridBagConstraints.BOTH;
add(lblloanform, gbc);
gbc.weighty = 1;
add(pnl1, gbc);
}
}
}
or just use a JTextArea
, with rows
and columns
properties gives you a little more control over the preferred size...

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.border.EmptyBorder;
public class Main {
public static void main(String[] args) {
new Main();
}
public Main() {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
JFrame frame = new JFrame();
frame.add(new TestPane());
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
});
}
public class TestPane extends JPanel {
public TestPane() {
setLayout(new GridBagLayout());
JLabel lblloanform = new JLabel("Loan Application Form");
lblloanform.setBorder(new EmptyBorder(8, 8, 8, 8));
lblloanform.setFont(new Font("Italic", Font.BOLD, 25));
JPanel pnl1 = new JPanel(new BorderLayout());
pnl1.setBorder(new EmptyBorder(8, 8, 8, 8));
pnl1.setBackground(Color.cyan);
JTextArea lbldescription = new JTextArea("Please fill in all needed information in the loan application form below to request a loan from your organization. Information regarding income assets are requested for qualification");
lbldescription.setLineWrap(true);
lbldescription.setWrapStyleWord(true);
lbldescription.setOpaque(false);
lbldescription.setColumns(40);
lbldescription.setRows(3);
lbldescription.setEditable(false);
pnl1.add(lbldescription);
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridwidth = GridBagConstraints.REMAINDER;
gbc.weightx = 1;
gbc.fill = GridBagConstraints.BOTH;
add(lblloanform, gbc);
gbc.weighty = 1;
add(pnl1, gbc);
}
}
}