Refine search
Box box = Box.createVerticalBox(); JLabel label1 = new JLabel("test1, the beginning"); label1.setAlignmentX(Component.RIGHT_ALIGNMENT); box.add(label1); JLabel label2 = new JLabel("test2, some more"); label2.setAlignmentX(Component.RIGHT_ALIGNMENT); box.add(label2); JLabel label3 = new JLabel("test3"); label3.setAlignmentX(Component.RIGHT_ALIGNMENT); box.add(label3); add(box);
public final void initUI() { Font font = new Font("Serif", Font.BOLD, 13); JLabel name = new JLabel("jadx"); name.setFont(font); name.setAlignmentX(0.5f); JLabel desc = new JLabel("Dex to Java decompiler"); desc.setFont(font); desc.setAlignmentX(0.5f); JLabel version = new JLabel("version: " + JadxDecompiler.getVersion()); version.setFont(font); version.setAlignmentX(0.5f);
JLabel text = new JLabel("<html>A head finder or tree reader was selected that has the default encoding " + encoding + "; this differs from " + oldEncoding + ", which was being used. If the encoding is changed, all newly loaded" + "treebanks will be read using the new encoding. Choosing an encoding that is not the true encoding of your tree " + "files may cause errors and unexpected behavior.</html>"); text.setAlignmentX(SwingConstants.LEADING); JPanel textPanel = new JPanel(new BorderLayout()); textPanel.setPreferredSize(new Dimension(100,100));
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); for (String subIncompat : incompatList) { JLabel label = new JLabel(subIncompat); label.setAlignmentX(Component.CENTER_ALIGNMENT); panel.add(label); JLabel infoLabel = new JLabel("<html><br><br>The project can be generated, but you wont be able to use these extensions in the respective sub modules<br>Please see the link to learn about extensions</html>"); infoLabel.setAlignmentX(Component.CENTER_ALIGNMENT); panel.add(infoLabel); JEditorPane pane = new JEditorPane("text/html", "<a href=\"https://github.com/libgdx/libgdx/wiki/Dependency-management-with-Gradle\">Dependency Management</a>");
final JPanel fileFilterPanel = new JPanel(); fileFilterPanel.setLayout(new BoxLayout(fileFilterPanel, BoxLayout.PAGE_AXIS)); JLabel text = new JLabel("<html>Please indicate any constraints on the files you want to load. All files in specified folders that satisfy all of the given constraints will be loaded. Just press Okay to load all files.</html>"); text.setAlignmentX(SwingConstants.LEADING); JPanel textPanel = new JPanel(new BorderLayout()); textPanel.setPreferredSize(new Dimension(100,50)); JOptionPane.showMessageDialog(dialog, new JLabel("<html>Please check the range you specified for the file number. Ranges must be numerical, and disjoint <br>ranges should be separated by commas. For example \"1-200,250-375\" is a valid range.</html>"), "Error in File Number Range", JOptionPane.ERROR_MESSAGE); return;
controls.add(checkLPC); JLabel lpcLabel = new JLabel("LPC order:"); lpcLabel.setAlignmentX(CENTER_ALIGNMENT); controls.add(lpcLabel); int min = 1;
controls.add(checkLPC); JLabel lpcLabel = new JLabel("LPC order:"); lpcLabel.setAlignmentX(CENTER_ALIGNMENT); controls.add(lpcLabel); int min = 1;
controls.add(checkCepstrum); JLabel cepstrumLabel = new JLabel("Cepstrum cutoff:"); cepstrumLabel.setAlignmentX(CENTER_ALIGNMENT); controls.add(cepstrumLabel); int min = 1;
controls.add(checkCepstrum); JLabel cepstrumLabel = new JLabel("Cepstrum cutoff:"); cepstrumLabel.setAlignmentX(CENTER_ALIGNMENT); controls.add(cepstrumLabel); int min = 1;
textPanel.add(textField); final JLabel placeholderLabel = new JLabel(hint); placeholderLabel.setForeground(Color.GRAY); placeholderLabel.setAlignmentX(0.0f); textPanel.add(placeholderLabel, 0);
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { assert value instanceof DeviceItem; DeviceItem display = (DeviceItem) value; JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); panel.setBorder(new EmptyBorder(10, 10, 10, 10)); JLabel iconLabel = new JLabel(display.getIcon()); iconLabel.setAlignmentX(Component.CENTER_ALIGNMENT); panel.add(iconLabel); for (String label : display.getLabel()) { JLabel l = new JLabel(label); // First label is larger font if (display.getLabel()[0].equals(label)) { Application.increaseFontSize(l); } else { Application.decreaseFontSize(l); } l.setAlignmentX(Component.CENTER_ALIGNMENT); panel.add(l); } panel.setBackground(Color.WHITE); if (isSelected) { iconLabel.setBorder(new LineBorder(Constants.GREEN_DARK, 4)); } else { iconLabel.setBorder(new LineBorder(Color.WHITE, 4)); } return panel; } }
textPanel.add(textField); final JLabel placeholderLabel = new JLabel(hint); placeholderLabel.setForeground(Color.GRAY); placeholderLabel.setAlignmentX(0.0f); textPanel.add(placeholderLabel, 0);
textPanel.add(textField); final JLabel placeholderLabel = new JLabel(hint); placeholderLabel.setForeground(Color.GRAY); placeholderLabel.setAlignmentX(0.0f); textPanel.add(placeholderLabel, 0);
textPanel.add(textField); final JLabel placeholderLabel = new JLabel(hint); placeholderLabel.setForeground(Color.GRAY); placeholderLabel.setAlignmentX(0.0f); textPanel.add(placeholderLabel, 0);
JLabel fftLabel = new JLabel("FFT size:"); fftLabel.setAlignmentX(CENTER_ALIGNMENT); controls.add(fftLabel); int min = 5; for (int i = min; i <= max; i++) { int twoPowI = 1 << i; // 2^i, e.g. i==8 => twoPowI==256 labelTable.put(new Integer(i), new JLabel(String.valueOf(twoPowI))); JLabel windowTypeLabel = new JLabel("Window type:"); windowTypeLabel.setAlignmentX(CENTER_ALIGNMENT); controls.add(windowTypeLabel); int[] windowTypes = Window.getAvailableTypes();
JLabel fftLabel = new JLabel("FFT size:"); fftLabel.setAlignmentX(CENTER_ALIGNMENT); controls.add(fftLabel); int min = 5; for (int i = min; i <= max; i++) { int twoPowI = 1 << i; // 2^i, e.g. i==8 => twoPowI==256 labelTable.put(new Integer(i), new JLabel(String.valueOf(twoPowI))); JLabel windowTypeLabel = new JLabel("Window type:"); windowTypeLabel.setAlignmentX(CENTER_ALIGNMENT); controls.add(windowTypeLabel); int[] windowTypes = Window.getAvailableTypes();
JLabel fftLabel = new JLabel("FFT size:"); fftLabel.setAlignmentX(CENTER_ALIGNMENT); controls.add(fftLabel); int min = 5; for (int i = min; i <= max; i++) { int twoPowI = 1 << i; // 2^i, e.g. i==8 => twoPowI==256 labelTable.put(new Integer(i), new JLabel(String.valueOf(twoPowI))); JLabel windowTypeLabel = new JLabel("Window type:"); windowTypeLabel.setAlignmentX(CENTER_ALIGNMENT); controls.add(windowTypeLabel); int[] windowTypes = Window.getAvailableTypes();
JLabel fftLabel = new JLabel("FFT size:"); fftLabel.setAlignmentX(CENTER_ALIGNMENT); controls.add(fftLabel); int min = 5; for (int i = min; i <= max; i++) { int twoPowI = 1 << i; // 2^i, e.g. i==8 => twoPowI==256 labelTable.put(new Integer(i), new JLabel(String.valueOf(twoPowI))); JLabel windowTypeLabel = new JLabel("Window type:"); windowTypeLabel.setAlignmentX(CENTER_ALIGNMENT); controls.add(windowTypeLabel); int[] windowTypes = Window.getAvailableTypes();
optionPanel.add(Box.createVerticalGlue()); JLabel inputLabel = new JLabel(Localization.get("input_density")); inputLabel.setAlignmentX(Component.LEFT_ALIGNMENT); optionPanel.add(inputLabel); inputDensityChoice = new JComboBox<ScreenDensity>( optionPanel.add(Box.createVerticalGlue()); JLabel outputLabel = new JLabel(Localization.get("output_density")); optionPanel.add(outputLabel); for (final ScreenDensity density : Configuration.getSettings().getSupportedScreenDensity()) {
private Component titledImagePanel(String string, RenderedImage expected) { JPanel panel = new JPanel(new BorderLayout()); final JLabel title = new JLabel(string); title.setAlignmentX(0.5f); title.setBorder(new LineBorder(Color.BLACK)); panel.add(title, BorderLayout.NORTH); panel.add( new ScrollingImagePanel( expected, Math.min(400, expected.getWidth()), Math.min(400, expected.getHeight())), BorderLayout.CENTER); return panel; }