Changeset 9543 in josm for trunk


Ignore:
Timestamp:
2016-01-20T00:05:07+01:00 (9 years ago)
Author:
Don-vip
Message:

refactoring - global simplification of use of setLayout method - simply pass layout to JPanel constructor

Location:
trunk/src/org/openstreetmap/josm
Files:
37 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/upload/RelationUploadOrderHook.java

    r8856 r9543  
    3838     */
    3939    protected JPanel buildWarningPanel(List<Relation> dep) {
    40         JPanel pnl = new JPanel();
    41         pnl.setLayout(new BorderLayout());
     40        JPanel pnl = new JPanel(new BorderLayout());
    4241        String msg = tr("<html>{0} relations build a cycle because they refer to each other.<br>"
    4342                + "JOSM cannot upload them. Please edit the relations and remove the "
  • trunk/src/org/openstreetmap/josm/gui/MapFrame.java

    r9246 r9543  
    182182        splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true);
    183183
    184         leftPanel = new JPanel();
    185         leftPanel.setLayout(new GridBagLayout());
     184        leftPanel = new JPanel(new GridBagLayout());
    186185        leftPanel.add(mapView, GBC.std().fill());
    187186        splitPane.setLeftComponent(leftPanel);
  • trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java

    r8510 r9543  
    4848        pane.add(customText, GBC.eol().fill(GBC.HORIZONTAL));
    4949        pane.add(progressBar, GBC.eop().fill(GBC.HORIZONTAL));
    50         JPanel buttons = new JPanel();
    51         buttons.setLayout(new GridBagLayout());
     50        JPanel buttons = new JPanel(new GridBagLayout());
    5251        btnCancel = new JButton(tr("Cancel"));
    5352        btnCancel.setIcon(ImageProvider.get("cancel"));
  • trunk/src/org/openstreetmap/josm/gui/SplashScreen.java

    r9243 r9543  
    6565
    6666        // Add a margin from the border to the content
    67         JPanel innerContentPane = new JPanel();
     67        JPanel innerContentPane = new JPanel(new GridBagLayout());
    6868        innerContentPane.setBorder(new EmptyBorder(10, 10, 2, 10));
    6969        contentPane.add(innerContentPane);
    70         innerContentPane.setLayout(new GridBagLayout());
    7170
    7271        // Add the logo
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java

    r9193 r9543  
    103103        gc.weightx = 1.0;
    104104        gc.weighty = 1.0;
    105         getContentPane().add(pnlTagResolver = new JPanel(), gc);
     105        getContentPane().add(pnlTagResolver = new JPanel(new BorderLayout()), gc);
    106106        gc.gridx = 0;
    107107        gc.gridy = 2;
     
    113113
    114114    protected JPanel buildButtonPanel() {
    115         JPanel pnl = new JPanel();
    116         pnl.setLayout(new FlowLayout(FlowLayout.CENTER));
     115        JPanel pnl = new JPanel(new FlowLayout(FlowLayout.CENTER));
    117116
    118117        // -- apply button
     
    132131
    133132    protected JPanel buildSourceAndTargetInfoPanel() {
    134         JPanel pnl = new JPanel();
    135         pnl.setLayout(new BorderLayout());
     133        JPanel pnl = new JPanel(new BorderLayout());
    136134        statisticsModel = new StatisticsTableModel();
    137135        pnl.add(new StatisticsInfoTable(statisticsModel), BorderLayout.CENTER);
     
    174172
    175173        // prepare the dialog with one tag resolver
    176         pnlTagResolver.setLayout(new BorderLayout());
    177174        pnlTagResolver.removeAll();
    178175        pnlTagResolver.add(allPrimitivesResolver, BorderLayout.CENTER);
     
    218215        initResolver(OsmPrimitiveType.RELATION, tagsForRelations, targetStatistics);
    219216
    220         pnlTagResolver.setLayout(new BorderLayout());
    221217        pnlTagResolver.removeAll();
    222218        pnlTagResolver.add(tpResolvers, BorderLayout.CENTER);
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java

    r8836 r9543  
    5050    protected final void build() {
    5151        setLayout(new GridBagLayout());
    52         JPanel pnl = new JPanel();
    53         pnl.setLayout(new BorderLayout());
     52        JPanel pnl = new JPanel(new BorderLayout());
    5453        pnl.add(lblHeader = new JMultilineLabel(""));
    5554        GridBagConstraints gc = new GridBagConstraints();
     
    6564        gc.insets = new Insets(0, 0, 0, 0);
    6665        add(new JScrollPane(tblResolver = new RelationMemberConflictResolverTable(model)), gc);
    67         pnl = new JPanel();
    68         pnl.setLayout(new BoxLayout(pnl, BoxLayout.Y_AXIS));
     66        pnl = new JPanel(new BoxLayout(pnl, BoxLayout.Y_AXIS));
    6967        pnl.add(buildRoleEditingPanel());
    7068        pnl.add(buildTagRelationsPanel());
     
    7674
    7775    protected JPanel buildRoleEditingPanel() {
    78         JPanel pnl = new JPanel();
    79         pnl.setLayout(new FlowLayout(FlowLayout.LEFT));
     76        JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT));
    8077        pnl.add(new JLabel(tr("Role:")));
    8178        pnl.add(tfRole = new AutoCompletingTextField(10));
     
    9592
    9693    protected JPanel buildTagRelationsPanel() {
    97         JPanel pnl = new JPanel();
    98         pnl.setLayout(new FlowLayout(FlowLayout.LEFT));
     94        JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT));
    9995        cbTagRelations = new JCheckBox(tr("Tag modified relations with "));
    10096        cbTagRelations.addChangeListener(new ToggleTagRelationsAction());
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolver.java

    r9078 r9543  
    3333
    3434    protected JPanel buildInfoPanel() {
    35         JPanel pnl = new JPanel();
     35        JPanel pnl = new JPanel(new GridBagLayout());
    3636        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    37         pnl.setLayout(new GridBagLayout());
    3837        GridBagConstraints gc = new GridBagConstraints();
    3938        gc.fill = GridBagConstraints.BOTH;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java

    r8836 r9543  
    7777     */
    7878    protected JPanel buildButtonRow() {
    79         JPanel pnl = new JPanel();
    80         pnl.setLayout(new FlowLayout(FlowLayout.CENTER));
     79        JPanel pnl = new JPanel(new FlowLayout(FlowLayout.CENTER));
    8180
    8281        applyResolutionAction = new ApplyResolutionAction();
  • trunk/src/org/openstreetmap/josm/gui/dialogs/DeleteFromRelationConfirmationDialog.java

    r9078 r9543  
    7575    protected JPanel buildRelationMemberTablePanel() {
    7676        JTable table = new JTable(model, new RelationMemberTableColumnModel());
    77         JPanel pnl = new JPanel();
    78         pnl.setLayout(new BorderLayout());
     77        JPanel pnl = new JPanel(new BorderLayout());
    7978        pnl.add(new JScrollPane(table));
    8079        return pnl;
     
    8281
    8382    protected JPanel buildButtonPanel() {
    84         JPanel pnl = new JPanel();
    85         pnl.setLayout(new FlowLayout());
     83        JPanel pnl = new JPanel(new FlowLayout());
    8684        pnl.add(btnOK = new SideButton(new OKAction()));
    8785        btnOK.setFocusable(true);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java

    r8836 r9543  
    5959    protected JPanel buildQueryPanel() {
    6060        ItemListener stateChangeHandler = new RestrictionGroupStateChangeHandler();
    61         JPanel pnl  = new VerticallyScrollablePanel();
     61        JPanel pnl  = new VerticallyScrollablePanel(new GridBagLayout());
    6262        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    63         pnl.setLayout(new GridBagLayout());
    6463        GridBagConstraints gc = new GridBagConstraints();
    6564
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r9525 r9543  
    158158
    159159    /** JPanel containing both previous tables */
    160     private final JPanel bothTables = new JPanel();
     160    private final JPanel bothTables = new JPanel(new GridBagLayout());
    161161
    162162    // Popup menus
     
    259259        // combine both tables and wrap them in a scrollPane
    260260        boolean top = Main.pref.getBoolean("properties.presets.top", true);
    261         bothTables.setLayout(new GridBagLayout());
    262261        if (top) {
    263262            bothTables.add(presets, GBC.std().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2).anchor(GBC.NORTHWEST));
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java

    r9059 r9543  
    9090     */
    9191    protected JPanel buildButtonPanel() {
    92         JPanel pnl = new JPanel();
    93         pnl.setLayout(new FlowLayout(FlowLayout.LEFT));
     92        JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT));
    9493
    9594        // ---
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java

    r9511 r9543  
    192192        pane.setPreferredSize(new Dimension(100, 100));
    193193
    194         JPanel pnl = new JPanel();
    195         pnl.setLayout(new BorderLayout());
     194        JPanel pnl = new JPanel(new BorderLayout());
    196195        pnl.add(pane, BorderLayout.CENTER);
    197196        pnl.setBorder(BorderFactory.createRaisedBevelBorder());
     
    418417        pnl.add(p3, gc);
    419418
    420         JPanel pnl2 = new JPanel();
    421         pnl2.setLayout(new GridBagLayout());
     419        JPanel pnl2 = new JPanel(new GridBagLayout());
    422420
    423421        gc.gridx = 0;
     
    461459        });
    462460
    463         JPanel pnl3 = new JPanel();
    464         pnl3.setLayout(new BorderLayout());
     461        JPanel pnl3 = new JPanel(new BorderLayout());
    465462        pnl3.add(splitPane, BorderLayout.CENTER);
    466463
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowser.java

    r9078 r9543  
    5353        referrers.addMouseListener(new DblClickMouseAdapter());
    5454
    55         JPanel pnl = new JPanel();
    56         pnl.setLayout(new FlowLayout(FlowLayout.LEFT));
     55        JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT));
    5756
    5857        ReloadAction reloadAction = new ReloadAction();
  • trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java

    r9059 r9543  
    5858     */
    5959    protected JPanel buildButtonPanel() {
    60         JPanel pnl = new JPanel();
    61         pnl.setLayout(new GridBagLayout());
     60        JPanel pnl = new JPanel(new GridBagLayout());
    6261        GridBagConstraints gc = new GridBagConstraints();
    6362        gc.gridy = 0;
     
    8079
    8180    protected JPanel buildDownloadAreaAddPanel() {
    82         JPanel pnl = new JPanel();
    83         pnl.setLayout(new GridBagLayout());
     81        JPanel pnl = new JPanel(new GridBagLayout());
    8482
    8583        GridBagConstraints  gc = new GridBagConstraints();
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java

    r9230 r9543  
    9191
    9292    protected final JPanel buildMainPanel() {
    93         JPanel pnl = new JPanel();
    94         pnl.setLayout(new GridBagLayout());
     93        JPanel pnl = new JPanel(new GridBagLayout());
    9594
    9695        final ChangeListener checkboxChangeListener = new ChangeListener() {
     
    187186
    188187    protected final JPanel buildButtonPanel() {
    189         JPanel pnl = new JPanel();
    190         pnl.setLayout(new FlowLayout());
     188        JPanel pnl = new JPanel(new FlowLayout());
    191189
    192190        // -- download button
  • trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java

    r9484 r9543  
    9595
    9696    protected JPanel buildSearchPanel() {
    97         JPanel lpanel = new JPanel();
    98         lpanel.setLayout(new GridLayout(2, 2));
    99         JPanel panel = new JPanel();
    100         panel.setLayout(new GridBagLayout());
     97        JPanel lpanel = new JPanel(new GridLayout(2, 2));
     98        JPanel panel = new JPanel(new GridBagLayout());
    10199
    102100        lpanel.add(new JLabel(tr("Choose the server for searching:")));
     
    135133    @Override
    136134    public void addGui(final DownloadDialog gui) {
    137         JPanel panel = new JPanel();
    138         panel.setLayout(new BorderLayout());
     135        JPanel panel = new JPanel(new BorderLayout());
    139136        panel.add(buildSearchPanel(), BorderLayout.NORTH);
    140137
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowser.java

    r9453 r9543  
    3939     */
    4040    protected JPanel createVersionTablePanel() {
    41         JPanel pnl = new JPanel();
    42         pnl.setLayout(new BorderLayout());
     41        JPanel pnl = new JPanel(new BorderLayout());
    4342
    4443        VersionTable versionTable = new VersionTable(model);
     
    6362        relationMemberListViewer = new RelationMemberListViewer(model);
    6463        coordinateInfoViewer = new CoordinateInfoViewer(model);
    65         JPanel pnl = new JPanel();
    66         pnl.setLayout(new BorderLayout());
     64        JPanel pnl = new JPanel(new BorderLayout());
    6765        pnl.add(tpViewers, BorderLayout.CENTER);
    6866
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialog.java

    r9059 r9543  
    8282        add(browser, BorderLayout.CENTER);
    8383
    84         JPanel pnl = new JPanel();
    85         pnl.setLayout(new FlowLayout(FlowLayout.CENTER));
     84        JPanel pnl = new JPanel(new FlowLayout(FlowLayout.CENTER));
    8685
    8786        SideButton btn = new SideButton(new ReloadAction());
  • trunk/src/org/openstreetmap/josm/gui/io/AbstractIOTask.java

    r7358 r9543  
    44/**
    55 * This is an abstract task for uploading or saving a data layer.
    6  *
     6 * @since 2025
    77 */
    88public abstract class AbstractIOTask implements Runnable {
  • trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java

    r8836 r9543  
    5252
    5353    protected JPanel buildTopPanel() {
    54         JPanel pnl = new JPanel();
     54        JPanel pnl = new JPanel(new BorderLayout());
    5555        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    56         pnl.setLayout(new BorderLayout());
    5756        pnl.add(new JLabel(tr("<html>Please select the changesets you want to close</html>")), BorderLayout.CENTER);
    5857        return pnl;
     
    6059
    6160    protected JPanel buildCenterPanel() {
    62         JPanel pnl = new JPanel();
    63         pnl.setLayout(new BorderLayout());
     61        JPanel pnl = new JPanel(new BorderLayout());
    6462        model = new DefaultListModel<>();
    6563        pnl.add(new JScrollPane(lstOpenChangesets = new JList<>(model)), BorderLayout.CENTER);
     
    6967
    7068    protected JPanel buildSouthPanel() {
    71         JPanel pnl = new JPanel();
    72         pnl.setLayout(new FlowLayout(FlowLayout.CENTER));
     69        JPanel pnl = new JPanel(new FlowLayout(FlowLayout.CENTER));
    7370
    7471        // -- close action
  • trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java

    r9173 r9543  
    103103     */
    104104    protected JPanel buildButtonRow() {
    105         JPanel pnl = new JPanel();
    106         pnl.setLayout(new GridBagLayout());
     105        JPanel pnl = new JPanel(new GridBagLayout());
    107106
    108107        saveAndProceedAction = new SaveAndProceedAction();
     
    120119        pnl.add(new JButton(cancelAction), GBC.std(1, 1).insets(5, 5, 5, 5).fill(GBC.HORIZONTAL));
    121120
    122         JPanel pnl2 = new JPanel();
    123         pnl2.setLayout(new BorderLayout());
     121        JPanel pnl2 = new JPanel(new BorderLayout());
    124122        pnl2.add(pnlUploadLayers = new UploadAndSaveProgressRenderer(), BorderLayout.CENTER);
    125123        model.addPropertyChangeListener(pnlUploadLayers);
  • trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java

    r9522 r9543  
    173173     */
    174174    protected JPanel buildActionPanel() {
    175         JPanel pnl = new JPanel();
    176         pnl.setLayout(new FlowLayout(FlowLayout.CENTER));
     175        JPanel pnl = new JPanel(new FlowLayout(FlowLayout.CENTER));
    177176        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    178177
  • trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java

    r9078 r9543  
    4040 * </pre>
    4141 */
    42 public class UploadLayerTask extends AbstractIOTask implements Runnable {
     42public class UploadLayerTask extends AbstractIOTask {
    4343    private OsmServerWriter writer;
    4444    private final OsmDataLayer layer;
  • trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java

    r8836 r9543  
    6666
    6767    protected JPanel buildSelectedPrimitivesPanel() {
    68         JPanel pnl = new JPanel();
    69         pnl.setLayout(new BorderLayout());
     68        JPanel pnl = new JPanel(new BorderLayout());
    7069        JLabel lbl = new JLabel(
    7170                tr("<html>Mark modified objects <strong>from the current selection</strong> to be uploaded to the server.</html>"));
     
    7877
    7978    protected JPanel buildDeletedPrimitivesPanel() {
    80         JPanel pnl = new JPanel();
    81         pnl.setLayout(new BorderLayout());
     79        JPanel pnl = new JPanel(new BorderLayout());
    8280        JLabel lbl = new JLabel(tr("<html>Mark <strong>locally deleted objects</strong> to be deleted on the server.</html>"));
    8381        lbl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
     
    8987
    9088    protected JPanel buildButtonPanel() {
    91         JPanel pnl = new JPanel();
    92         pnl.setLayout(new FlowLayout());
     89        JPanel pnl = new JPanel(new FlowLayout());
    9390        ContinueAction continueAction = new ContinueAction();
    9491        pnl.add(btnContinue = new SideButton(continueAction));
  • trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java

    r8840 r9543  
    7171
    7272    protected JPanel buildUploadStrategyPanel() {
    73         JPanel pnl = new JPanel();
    74         pnl.setLayout(new GridBagLayout());
     73        JPanel pnl = new JPanel(new GridBagLayout());
    7574        ButtonGroup bgStrategies = new ButtonGroup();
    7675        rbStrategy = new EnumMap<>(UploadStrategy.class);
     
    181180
    182181    protected JPanel buildMultiChangesetPolicyPanel() {
    183         pnlMultiChangesetPolicyPanel = new JPanel();
    184         pnlMultiChangesetPolicyPanel.setLayout(new GridBagLayout());
     182        pnlMultiChangesetPolicyPanel = new JPanel(new GridBagLayout());
    185183        GridBagConstraints gc = new GridBagConstraints();
    186184        gc.gridx = 0;
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r9384 r9543  
    346346            SimpleDateFormat dateFormat = (SimpleDateFormat) DateUtils.getDateTimeFormat(DateFormat.SHORT, DateFormat.MEDIUM);
    347347
    348             panel = new JPanel();
    349             panel.setLayout(new BorderLayout());
     348            panel = new JPanel(new BorderLayout());
    350349            panel.add(new JLabel(tr("<html>Take a photo of your GPS receiver while it displays the time.<br>"
    351350                    + "Display that photo here.<br>"
     
    357356            panel.add(imgDisp, BorderLayout.CENTER);
    358357
    359             JPanel panelTf = new JPanel();
    360             panelTf.setLayout(new GridBagLayout());
     358            JPanel panelTf = new JPanel(new GridBagLayout());
    361359
    362360            GridBagConstraints gc = new GridBagConstraints();
     
    439437            panel.add(panelTf, BorderLayout.SOUTH);
    440438
    441             JPanel panelLst = new JPanel();
    442             panelLst.setLayout(new BorderLayout());
     439            JPanel panelLst = new JPanel(new BorderLayout());
    443440
    444441            imgList = new JList<>(new AbstractListModel<String>() {
     
    603600        panelCb.add(buttonOpen);
    604601
    605         JPanel panelTf = new JPanel();
    606         panelTf.setLayout(new GridBagLayout());
     602        JPanel panelTf = new JPanel(new GridBagLayout());
    607603
    608604        String prefTimezone = Main.pref.get("geoimage.timezone", "0:00");
     
    735731        panelTf.add(cbShowThumbs, gbc);
    736732
    737         final JPanel statusBar = new JPanel();
    738         statusBar.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
     733        final JPanel statusBar = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
    739734        statusBar.setBorder(BorderFactory.createLoweredBevelBorder());
    740735        statusBarText = new JLabel(" ");
     
    752747        statusBarUpdater.updateStatusBar();
    753748
    754         outerPanel = new JPanel();
    755         outerPanel.setLayout(new BorderLayout());
     749        outerPanel = new JPanel(new BorderLayout());
    756750        outerPanel.add(statusBar, BorderLayout.PAGE_END);
    757751
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java

    r9416 r9543  
    8080
    8181    protected void build() {
    82         JPanel content = new JPanel();
    83         content.setLayout(new BorderLayout());
     82        JPanel content = new JPanel(new BorderLayout());
    8483
    8584        content.add(imgDisplay, BorderLayout.CENTER);
     
    176175        buttons.add(btnCopyPath);
    177176
    178         JPanel bottomPane = new JPanel();
    179         bottomPane.setLayout(new GridBagLayout());
     177        JPanel bottomPane = new JPanel(new GridBagLayout());
    180178        GridBagConstraints gc = new GridBagConstraints();
    181179        gc.gridx = 0;
  • trunk/src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java

    r8510 r9543  
    5252    @Override
    5353    public void addGui(PreferenceTabbedPane gui) {
    54         JPanel panel = new VerticallyScrollablePanel();
    55         panel.setLayout(new GridBagLayout());
     54        JPanel panel = new VerticallyScrollablePanel(new GridBagLayout());
    5655        panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    5756
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java

    r9100 r9543  
    320320
    321321        projPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    322         projPanel.setLayout(new GridBagLayout());
    323322        projPanel.add(new JLabel(tr("Projection method")), GBC.std().insets(5, 5, 0, 5));
    324323        projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java

    r8836 r9543  
    6363            group.add(south);
    6464
    65             JPanel bPanel = new JPanel();
    66             bPanel.setLayout(new GridBagLayout());
     65            JPanel bPanel = new JPanel(new GridBagLayout());
    6766
    6867            bPanel.add(new JLabel(tr("North")), GBC.std().insets(5, 5, 0, 5));
  • trunk/src/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreference.java

    r8510 r9543  
    100100        remote.add(enableRemoteControl, GBC.eol());
    101101
    102         final JPanel wrapper = new JPanel();
    103         wrapper.setLayout(new GridBagLayout());
     102        final JPanel wrapper = new JPanel(new GridBagLayout());
    104103        wrapper.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.gray)));
    105104
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java

    r9352 r9543  
    8686        gc.weightx = 1.0;
    8787        gc.weighty = 1.0;
    88         pnlAuthenticationParameteters = new JPanel();
     88        pnlAuthenticationParameteters = new JPanel(new BorderLayout());
    8989        add(pnlAuthenticationParameteters, gc);
    90         pnlAuthenticationParameteters.setLayout(new BorderLayout());
    9190
    9291        //-- the two panels for authentication parameters
  • trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java

    r9353 r9543  
    118118        gc.weightx = 1.0;
    119119        gc.insets = new Insets(10, 0, 0, 0);
    120         add(pnlAuthorisationMessage = new JPanel(), gc);
    121         pnlAuthorisationMessage.setLayout(new BorderLayout());
     120        add(pnlAuthorisationMessage = new JPanel(new BorderLayout()), gc);
    122121
    123122        // create these two panels, they are going to be used later in refreshView
  • trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java

    r9224 r9543  
    1010import java.awt.GridBagConstraints;
    1111import java.awt.GridBagLayout;
     12import java.awt.GridLayout;
    1213import java.awt.Insets;
    1314import java.awt.Toolkit;
     
    186187
    187188    private void initComponents() {
    188         JPanel listPane = new JPanel();
     189        JPanel listPane = new JPanel(new GridLayout());
    189190        JScrollPane listScrollPane = new JScrollPane();
    190         JPanel shortcutEditPane = new JPanel();
     191        JPanel shortcutEditPane = new JPanel(new GridLayout(5, 2));
    191192
    192193        CbAction action = new CbAction(this);
    193194        setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
    194195        add(buildFilterPanel());
    195         listPane.setLayout(new java.awt.GridLayout());
    196196
    197197        // This is the list of shortcuts:
     
    211211
    212212        // and here follows the edit area. I won't object to someone re-designing it, it looks, um, "minimalistic" ;)
    213         shortcutEditPane.setLayout(new java.awt.GridLayout(5, 2));
    214213
    215214        cbDefault.setAction(action);
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java

    r9231 r9543  
    4949     */
    5050    protected JPanel buildTagTableEditorPanel() {
    51         JPanel pnl = new JPanel();
    52         pnl.setLayout(new BorderLayout());
     51        JPanel pnl = new JPanel(new BorderLayout());
    5352        pnl.add(new JScrollPane(tagTable), BorderLayout.CENTER);
    5453        if (presetHandler != null) {
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java

    r9231 r9543  
    215215
    216216        // set the content of this AddTagsDialog consisting of the tableHeader and the table itself.
    217         JPanel tablePanel = new JPanel();
    218         tablePanel.setLayout(new GridBagLayout());
     217        JPanel tablePanel = new JPanel(new GridBagLayout());
    219218        tablePanel.add(propertyTable.getTableHeader(), GBC.eol().fill(GBC.HORIZONTAL));
    220219        tablePanel.add(propertyTable, GBC.eol().fill(GBC.BOTH));
Note: See TracChangeset for help on using the changeset viewer.