Changeset 18845 in josm for trunk/src


Ignore:
Timestamp:
2023-09-25T22:48:22+02:00 (14 months ago)
Author:
taylor.smock
Message:

Fix #23189: Conflict tag tables should resize with the conflict window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java

    r16267 r18845  
    55
    66import java.awt.Adjustable;
     7import java.awt.GridBagConstraints;
     8import java.awt.GridBagLayout;
    79import java.awt.event.ActionEvent;
    810import java.awt.event.AdjustmentEvent;
     
    1921import javax.swing.JButton;
    2022import javax.swing.JComponent;
     23import javax.swing.JPanel;
    2124import javax.swing.JScrollPane;
    2225import javax.swing.JTable;
     
    3033import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType;
    3134import org.openstreetmap.josm.gui.tagging.TagTableColumnModelBuilder;
     35import org.openstreetmap.josm.gui.util.GuiHelper;
    3236import org.openstreetmap.josm.tools.GBC;
    3337import org.openstreetmap.josm.tools.ImageProvider;
     
    113117         */
    114118        JScrollPane embeddInScrollPane(JTable table) {
    115             JScrollPane pane = new JScrollPane(table);
     119            // See #23189: Tag tables should resize (where possible) with the window
     120            final JPanel panel = new JPanel(new GridBagLayout());
     121            panel.add(table.getTableHeader(), GBC.eol().fill(GridBagConstraints.HORIZONTAL));
     122            panel.add(table, GBC.eol().fill(GridBagConstraints.BOTH));
     123            final JScrollPane pane = GuiHelper.embedInVerticalScrollPane(panel);
    116124            adjustmentSynchronizer.synchronizeAdjustment(pane.getVerticalScrollBar());
    117125            return pane;
Note: See TracChangeset for help on using the changeset viewer.