本文整理汇总了Java中javax.swing.GroupLayout.setHorizontalGroup方法的典型用法代码示例。如果您正苦于以下问题:Java GroupLayout.setHorizontalGroup方法的具体用法?Java GroupLayout.setHorizontalGroup怎么用?Java GroupLayout.setHorizontalGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.GroupLayout
的用法示例。
在下文中一共展示了GroupLayout.setHorizontalGroup方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initComponents
import javax.swing.GroupLayout; //导入方法依赖的package包/类
/**
* This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
innerPanel = new JPanel();
innerPanel.setLayout(new BorderLayout());
GroupLayout layout = new GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(innerPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(innerPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
}
示例2: initComponents
import javax.swing.GroupLayout; //导入方法依赖的package包/类
private void initComponents(JScrollPane tablePane, FindInQueryBar findBar) {
GroupLayout layout = new GroupLayout(component);
component.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(findBar, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(tablePane, GroupLayout.DEFAULT_SIZE, 549, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(tablePane, GroupLayout.DEFAULT_SIZE, 379, Short.MAX_VALUE)
.addGap(0, 0, 0)
.addComponent(findBar, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
);
}
示例3: CollisionBoxPanel
import javax.swing.GroupLayout; //导入方法依赖的package包/类
public CollisionBoxPanel() {
TitledBorder border = new TitledBorder(new LineBorder(new Color(128, 128, 128)), Resources.get("panel_collisionBox"), TitledBorder.LEADING, TitledBorder.TOP, null, null);
border.setTitleFont(border.getTitleFont().deriveFont(Font.BOLD));
setBorder(border);
chckbxIsObstacle = new JCheckBox(Resources.get("panel_isObstacle"));
GroupLayout groupLayout = new GroupLayout(this);
groupLayout.setHorizontalGroup(
groupLayout.createParallelGroup(Alignment.LEADING)
.addGroup(groupLayout.createSequentialGroup()
.addContainerGap()
.addComponent(chckbxIsObstacle, GroupLayout.PREFERRED_SIZE, 108, GroupLayout.PREFERRED_SIZE)
.addContainerGap(322, Short.MAX_VALUE)));
groupLayout.setVerticalGroup(
groupLayout.createParallelGroup(Alignment.LEADING)
.addGroup(groupLayout.createSequentialGroup()
.addComponent(chckbxIsObstacle, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE)
.addContainerGap(258, Short.MAX_VALUE)));
setLayout(groupLayout);
this.setupChangedListeners();
}
示例4: init
import javax.swing.GroupLayout; //导入方法依赖的package包/类
private void init() {
errorLabel.setText(" "); // NOI18N
GroupLayout containerPanelLayout = new GroupLayout(containerPanel);
containerPanel.setLayout(containerPanelLayout);
GroupLayout.ParallelGroup horizontalGroup = containerPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING);
GroupLayout.SequentialGroup verticalGroup = containerPanelLayout.createSequentialGroup();
containerPanelLayout.setHorizontalGroup(horizontalGroup);
containerPanelLayout.setVerticalGroup(
containerPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(verticalGroup)
);
for (CssPreprocessorUIImplementation.Options options : allOptions) {
JComponent component = options.getComponent();
Parameters.notNull("component", component); // NOI18N
horizontalGroup.addComponent(component, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE);
verticalGroup.addComponent(component, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED);
}
}
示例5: FormLayoutHelper
import javax.swing.GroupLayout; //导入方法依赖的package包/类
public FormLayoutHelper(JPanel panel, Column... columns) {
this.panel = panel;
layout = new GroupLayout(panel);
panel.setLayout(layout);
horizontalGroup = layout.createSequentialGroup();
verticalGroup = layout.createSequentialGroup();
this.columns = columns;
columnGroups = new Group[columns.length];
for (int i = 0; i < columns.length; i++) {
Group columnGroup = columns[i].createParallelGroup(layout);
columnGroups[i] = columnGroup;
horizontalGroup.addGroup(columnGroup);
}
layout.setHorizontalGroup(horizontalGroup);
layout.setVerticalGroup(verticalGroup);
}
示例6: createCustomEditorGUI
import javax.swing.GroupLayout; //导入方法依赖的package包/类
protected Component createCustomEditorGUI(Component resourcePanelGUI) {
if (resourcePanelGUI == null)
return delegateEditor.getCustomEditor();
JPanel panel = new JPanel();
Component delComp = delegateEditor.getCustomEditor();
GroupLayout layout = new GroupLayout(panel);
panel.setLayout(layout);
layout.setAutoCreateGaps(true);
layout.setHorizontalGroup(layout.createParallelGroup()
.addComponent(delComp)
.addGroup(layout.createSequentialGroup()
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(resourcePanelGUI)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)));
layout.setVerticalGroup(layout.createSequentialGroup()
.addComponent(delComp).addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(resourcePanelGUI));
return panel;
}
示例7: initializeGroupLayout
import javax.swing.GroupLayout; //导入方法依赖的package包/类
private void initializeGroupLayout() {
GroupLayout groupLayout = new GroupLayout(contentPane);
groupLayout.setHorizontalGroup(groupLayout.createParallelGroup(Alignment.LEADING).addGroup(groupLayout
.createSequentialGroup()
.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
.addGroup(groupLayout.createSequentialGroup().addContainerGap()
.addComponent(this.btnContratacao, GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE))
.addGroup(groupLayout.createSequentialGroup().addGap(79).addComponent(this.btnCadastro,
GroupLayout.PREFERRED_SIZE, 119, GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
.addGroup(Alignment.TRAILING, groupLayout.createSequentialGroup().addContainerGap(45, Short.MAX_VALUE)
.addComponent(this.lblTitle, GroupLayout.PREFERRED_SIZE, 178, GroupLayout.PREFERRED_SIZE)
.addGap(40)));
groupLayout.setVerticalGroup(groupLayout.createParallelGroup(Alignment.LEADING).addGroup(groupLayout
.createSequentialGroup().addGap(33)
.addComponent(this.lblTitle, GroupLayout.PREFERRED_SIZE, 41, GroupLayout.PREFERRED_SIZE).addGap(39)
.addComponent(btnCadastro, GroupLayout.PREFERRED_SIZE, 41, GroupLayout.PREFERRED_SIZE).addGap(33)
.addComponent(this.btnContratacao, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE)
.addContainerGap(47, Short.MAX_VALUE)));
this.contentPane.setLayout(groupLayout);
}
示例8: resetLayout
import javax.swing.GroupLayout; //导入方法依赖的package包/类
private void resetLayout() {
GroupLayout layout = new GroupLayout(this);
this.setLayout(layout);
layout.setAutoCreateContainerGaps(true);
layout.setHorizontalGroup(layout.createSequentialGroup()
.addComponent(headerLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addGap(3)
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane, GroupLayout.PREFERRED_SIZE, 320, Short.MAX_VALUE)
.addComponent(typeField))
.addGap(3)
.addComponent(footerLabel));
int prefHeight;
int maxHeight;
if(jScrollPane.getPreferredSize().getHeight() > 300) {
prefHeight = 300;
maxHeight = GroupLayout.DEFAULT_SIZE;
} else {
prefHeight = GroupLayout.DEFAULT_SIZE;
maxHeight = GroupLayout.PREFERRED_SIZE;
}
layout.setVerticalGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(jScrollPane.getInsets().top)
.addGroup(layout.createParallelGroup().addComponent(headerLabel).addComponent(footerLabel)))
.addComponent(jScrollPane, GroupLayout.DEFAULT_SIZE, prefHeight, maxHeight))
.addComponent(typeField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE));
}
示例9: layoutComponents
import javax.swing.GroupLayout; //导入方法依赖的package包/类
private void layoutComponents() {
JScrollPane printTextScrollPane = new JScrollPane(appendTextInput);
printTextScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
JSeparator separator1 = new JSeparator();
JScrollPane readLineTextScrollPane = new JScrollPane(readLineOutput);
readLineTextScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
JSeparator separator2 = new JSeparator();
JScrollPane consoleScrollPane = new JScrollPane(consoleText);
consoleScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
GroupLayout groupLayout = new GroupLayout(this);
groupLayout.setAutoCreateContainerGaps(true);
groupLayout.setAutoCreateGaps(true);
groupLayout.setHorizontalGroup(groupLayout.createParallelGroup().addComponent(printTextScrollPane)
.addComponent(appendText, Alignment.TRAILING).addComponent(separator1)
.addComponent(readLine, Alignment.TRAILING).addComponent(readLineTextScrollPane)
.addComponent(separator2).addComponent(consoleScrollPane));
groupLayout.setVerticalGroup(groupLayout.createSequentialGroup()
.addComponent(printTextScrollPane, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
GroupLayout.PREFERRED_SIZE)
.addComponent(appendText)
.addComponent(separator1, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
GroupLayout.PREFERRED_SIZE)
.addComponent(readLine)
.addComponent(readLineTextScrollPane, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
GroupLayout.PREFERRED_SIZE)
.addComponent(separator2, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
GroupLayout.PREFERRED_SIZE)
.addComponent(consoleScrollPane));
setLayout(groupLayout);
}
示例10: GridEditPanel
import javax.swing.GroupLayout; //导入方法依赖的package包/类
public GridEditPanel(int rasterSize) {
JLabel lblSize = new JLabel("size (px)");
lblSize.setFont(Program.TEXT_FONT.deriveFont(Font.BOLD).deriveFont(10f));
textField = new JFormattedTextField(NumberFormat.getIntegerInstance());
textField.setText("16");
textField.setFont(Program.TEXT_FONT.deriveFont(10f));
textField.setColumns(10);
textField.setValue(rasterSize);
GroupLayout groupLayout = new GroupLayout(this);
groupLayout.setHorizontalGroup(
groupLayout.createParallelGroup(Alignment.LEADING)
.addGroup(groupLayout.createSequentialGroup()
.addContainerGap()
.addComponent(lblSize, GroupLayout.PREFERRED_SIZE, 44, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(textField, GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE)
.addGap(34)));
groupLayout.setVerticalGroup(
groupLayout.createParallelGroup(Alignment.LEADING)
.addGroup(groupLayout.createSequentialGroup()
.addContainerGap()
.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
.addComponent(lblSize, GroupLayout.PREFERRED_SIZE, 13, GroupLayout.PREFERRED_SIZE)
.addComponent(textField, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
.addContainerGap(46, Short.MAX_VALUE)));
setLayout(groupLayout);
}
示例11: layoutHeaderPanel
import javax.swing.GroupLayout; //导入方法依赖的package包/类
private void layoutHeaderPanel(JPanel headerPanel, JLabel iconLabel, JLabel leftLabel, JLabel commentLabel, JLabel rightLabel, LinkButton replyButton, LinkButton mailtoButton, JLabel stateLabel) {
GroupLayout layout = new GroupLayout(headerPanel);
headerPanel.setLayout(layout);
GroupLayout.SequentialGroup hGroup = layout.createSequentialGroup()
.addComponent(iconLabel)
.addComponent(leftLabel);
if (stateLabel != null) {
hGroup.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(stateLabel);
}
hGroup.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(commentLabel,0, 0, Short.MAX_VALUE)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(rightLabel)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(replyButton);
if (mailtoButton != null) {
hGroup.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(mailtoButton);
}
layout.setHorizontalGroup(hGroup);
GroupLayout.ParallelGroup vGroup = layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(iconLabel)
.addComponent(leftLabel);
if (stateLabel != null) {
vGroup.addComponent(stateLabel);
}
vGroup.addComponent(commentLabel)
.addComponent(rightLabel)
.addComponent(replyButton);
if (mailtoButton != null) {
vGroup.addComponent(mailtoButton);
}
layout.setVerticalGroup(vGroup);
}
示例12: getTableCellRendererComponent
import javax.swing.GroupLayout; //导入方法依赖的package包/类
@Override
public Component getTableCellRendererComponent(JTable table,
Object value, boolean isSelected, boolean hasFocus, int row,
int column) {
JPanel panel = new JPanel();
if (value instanceof String[]) {
String[] valueArray = (String[]) value;
if (valueArray.length == 0)
return panel;
GroupLayout layout = new GroupLayout(panel);
panel.setLayout(layout);
layout.setAutoCreateGaps(true);
layout.setAutoCreateContainerGaps(true);
SequentialGroup cols = layout.createSequentialGroup();
layout.setHorizontalGroup(cols);
ParallelGroup col1 = layout
.createParallelGroup(GroupLayout.Alignment.LEADING);
ParallelGroup col2 = layout
.createParallelGroup(GroupLayout.Alignment.TRAILING);
cols.addGroup(col1)
.addPreferredGap(
LayoutStyle.ComponentPlacement.RELATED,
GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(col2);
SequentialGroup rows = layout.createSequentialGroup();
layout.setVerticalGroup(rows);
for (int i = 0; i < valueArray.length; i++) {
// the value array has null elements for
// IdResource/Demand
if (valueArray[i] != null) {
/* TODO: Fix ArrayIndexOutofBounds Exception here
* Update: Problem is actually above. Probably linked to resources without setters. */
//System.out.println("ValueArray: " + valueArray[i]);
//for (int j = 0; j < resParamNames.size(); j++) { System.out.println("resParamNames: " + resParamNames.get(j)); }
JLabel label = new JLabel();
if (resParamNames.get(row).length == 0)
label.setText("max. param");
else
label.setText("max. " + resParamNames.get(row)[i]);
JTextField tf = new JTextField(3);
tf.setText(valueArray[i]);
col1.addComponent(label);
col2.addComponent(tf, GroupLayout.PREFERRED_SIZE,
GroupLayout.DEFAULT_SIZE,
GroupLayout.PREFERRED_SIZE);
rows.addGroup(layout
.createParallelGroup(
GroupLayout.Alignment.CENTER)
.addComponent(label).addComponent(tf));
}
}
}
table.setRowHeight(row, Math.max(table.getRowHeight(row),
(int) panel.getPreferredSize().getHeight()));
TableColumn cm = table.getColumnModel().getColumn(column);
cm.setMinWidth(Math.max(cm.getMinWidth(), (int) panel
.getPreferredSize().getWidth()));
return panel;
}
示例13: getTableCellEditorComponent
import javax.swing.GroupLayout; //导入方法依赖的package包/类
@Override
public Component getTableCellEditorComponent(JTable table,
Object value, boolean isSelected, int row, int column) {
panel = new JPanel();
if (value instanceof String[]) {
String[] valueArray = (String[]) value;
if (valueArray.length == 0)
return panel;
GroupLayout layout = new GroupLayout(panel);
panel.setLayout(layout);
layout.setAutoCreateGaps(true);
layout.setAutoCreateContainerGaps(true);
SequentialGroup cols = layout.createSequentialGroup();
layout.setHorizontalGroup(cols);
ParallelGroup col1 = layout
.createParallelGroup(GroupLayout.Alignment.LEADING);
ParallelGroup col2 = layout
.createParallelGroup(GroupLayout.Alignment.TRAILING);
cols.addGroup(col1)
.addPreferredGap(
LayoutStyle.ComponentPlacement.RELATED,
GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(col2);
SequentialGroup rows = layout.createSequentialGroup();
layout.setVerticalGroup(rows);
for (int i = 0; i < valueArray.length; i++) {
// create the label. use the resource param name for both
// resource and demand params as it should be the same. TODO
JLabel label = new JLabel();
if (resParamNames.get(row).length == 0)
label.setText("max. param");
else
label.setText("max. " + resParamNames.get(row)[i]);
JTextField tf = new JTextField(3);
tf.setText(valueArray[i]);
tf.setEditable(true);
col1.addComponent(label);
col2.addComponent(tf, GroupLayout.PREFERRED_SIZE,
GroupLayout.DEFAULT_SIZE,
GroupLayout.PREFERRED_SIZE);
rows.addGroup(layout
.createParallelGroup(GroupLayout.Alignment.CENTER)
.addComponent(label).addComponent(tf));
}
}
table.setRowHeight(row, Math.max(table.getRowHeight(row),
(int) panel.getPreferredSize().getHeight()));
TableColumn cm = table.getColumnModel().getColumn(column);
cm.setMinWidth(Math.max(cm.getMinWidth(), (int) panel
.getPreferredSize().getWidth()));
return panel;
}
示例14: SpawnpointPanel
import javax.swing.GroupLayout; //导入方法依赖的package包/类
public SpawnpointPanel() {
TitledBorder border = new TitledBorder(new LineBorder(new Color(128, 128, 128)), Resources.get("panel_spawnPoint"), TitledBorder.LEADING, TitledBorder.TOP, null, null);
border.setTitleFont(border.getTitleFont().deriveFont(Font.BOLD));
setBorder(border);
JLabel lblShadowType = new JLabel(Resources.get("panel_entity"));
textFieldType = new JTextField();
textFieldType.setColumns(10);
JLabel lblDirection = new JLabel(Resources.get("panel_direction"));
comboBoxDirection = new JComboBox<>();
comboBoxDirection.setModel(new DefaultComboBoxModel<Direction>(Direction.values()));
GroupLayout groupLayout = new GroupLayout(this);
groupLayout.setHorizontalGroup(
groupLayout.createParallelGroup(Alignment.LEADING)
.addGroup(groupLayout.createSequentialGroup()
.addContainerGap()
.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
.addGroup(groupLayout.createSequentialGroup()
.addComponent(lblShadowType, GroupLayout.PREFERRED_SIZE, 51, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(textFieldType, GroupLayout.DEFAULT_SIZE, 371, Short.MAX_VALUE))
.addGroup(groupLayout.createSequentialGroup()
.addComponent(lblDirection, GroupLayout.PREFERRED_SIZE, 51, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(comboBoxDirection, 0, 371, Short.MAX_VALUE)))
.addGap(4)));
groupLayout.setVerticalGroup(
groupLayout.createParallelGroup(Alignment.LEADING)
.addGroup(groupLayout.createSequentialGroup()
.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
.addComponent(lblShadowType, GroupLayout.PREFERRED_SIZE, 13, GroupLayout.PREFERRED_SIZE)
.addComponent(textFieldType, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(ComponentPlacement.RELATED)
.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
.addComponent(lblDirection, GroupLayout.PREFERRED_SIZE, 13, GroupLayout.PREFERRED_SIZE)
.addComponent(comboBoxDirection, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
.addContainerGap(226, Short.MAX_VALUE)));
setLayout(groupLayout);
this.setupChangedListeners();
}
示例15: ResultBeatmapCell
import javax.swing.GroupLayout; //导入方法依赖的package包/类
/**
* Create the panel.
*/
public ResultBeatmapCell() {
lblImg = new JLabel("Loading thumb...");
lblImg.setFont(new Font("Tahoma", Font.PLAIN, 12));
lblImg.setHorizontalAlignment(SwingConstants.CENTER);
lblName = new JLabel("---");
lblName.setFont(new Font("Tahoma", Font.PLAIN, 18));
lblCreator = new JLabel("---");
lblCreator.setFont(new Font("Tahoma", Font.PLAIN, 12));
lblTags = new JLabel("Tags:");
lblTags.setFont(new Font("Tahoma", Font.PLAIN, 12));
lblStatus = new JLabel("---");
lblStatus.setFont(new Font("Tahoma", Font.PLAIN, 12));
lblStatus.setHorizontalAlignment(SwingConstants.CENTER);
lblMoreDetails = new JLabel("Click to see more details.");
lblMoreDetails.setFont(new Font("Tahoma", Font.PLAIN, 12));
lblMoreDetails.setHorizontalAlignment(SwingConstants.CENTER);
GroupLayout groupLayout = new GroupLayout(this);
groupLayout.setHorizontalGroup(
groupLayout.createParallelGroup(Alignment.LEADING)
.addGroup(groupLayout.createSequentialGroup()
.addContainerGap()
.addComponent(lblImg, GroupLayout.PREFERRED_SIZE, 166, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(ComponentPlacement.RELATED)
.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
.addComponent(lblCreator, GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE)
.addComponent(lblName, GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE)
.addComponent(lblTags, GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE)
.addComponent(lblStatus, GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE)
.addComponent(lblMoreDetails, GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE))
.addContainerGap())
);
groupLayout.setVerticalGroup(
groupLayout.createParallelGroup(Alignment.LEADING)
.addGroup(groupLayout.createSequentialGroup()
.addContainerGap()
.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
.addGroup(groupLayout.createSequentialGroup()
.addComponent(lblName)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(lblCreator)
.addPreferredGap(ComponentPlacement.UNRELATED)
.addComponent(lblTags)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(lblStatus)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(lblMoreDetails))
.addComponent(lblImg, GroupLayout.DEFAULT_SIZE, 113, Short.MAX_VALUE))
.addContainerGap())
);
setLayout(groupLayout);
}