diff --git a/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellJPanel.java b/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellJPanel.java index a9a8a39f4..560c9889b 100644 --- a/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellJPanel.java +++ b/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellJPanel.java @@ -33,6 +33,7 @@ public class ContributedLibraryTableCellJPanel extends JPanel { final JPanel buttonsPanel; final JPanel inactiveButtonsPanel; final JLabel statusLabel; + final JTextPane description; private final String moreInfoLbl = tr("More info"); public ContributedLibraryTableCellJPanel(JTable parentTable, Object value, @@ -68,7 +69,8 @@ public class ContributedLibraryTableCellJPanel extends JPanel { versionToInstallChooser .setMinimumSize(new Dimension((int)versionToInstallChooser.getPreferredSize().getWidth() + 50, (int)versionToInstallChooser.getPreferredSize().getHeight())); - makeNewDescription(); + description = makeNewDescription(); + add(description); buttonsPanel = new JPanel(); buttonsPanel.setLayout(new BoxLayout(buttonsPanel, BoxLayout.X_AXIS)); @@ -112,7 +114,6 @@ public class ContributedLibraryTableCellJPanel extends JPanel { add(Box.createVerticalStrut(15)); ContributedLibraryReleases releases = (ContributedLibraryReleases) value; - JTextPane description = makeNewDescription(); // FIXME: happens on macosx, don't know why if (releases == null) @@ -231,9 +232,6 @@ public class ContributedLibraryTableCellJPanel extends JPanel { // TODO Make this a method of Theme private JTextPane makeNewDescription() { - if (getComponentCount() > 0) { - remove(0); - } JTextPane description = new JTextPane(); description.setInheritsPopupMenu(true); Insets margin = description.getMargin(); @@ -259,7 +257,6 @@ public class ContributedLibraryTableCellJPanel extends JPanel { } }); // description.addKeyListener(new DelegatingKeyListener(parentTable)); - add(description, 0); return description; } diff --git a/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellJPanel.java b/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellJPanel.java index 9575d12e6..2f42a9026 100644 --- a/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellJPanel.java +++ b/app/src/cc/arduino/contributions/packages/ui/ContributedPlatformTableCellJPanel.java @@ -66,6 +66,7 @@ public class ContributedPlatformTableCellJPanel extends JPanel { final JPanel buttonsPanel; final JPanel inactiveButtonsPanel; final JLabel statusLabel; + final JTextPane description; private final String moreInfoLbl = tr("More Info"); private final String onlineHelpLbl = tr("Online Help"); @@ -108,7 +109,8 @@ public class ContributedPlatformTableCellJPanel extends JPanel { versionToInstallChooser .setMaximumSize(versionToInstallChooser.getPreferredSize()); - makeNewDescription(); + description = makeNewDescription(); + add(description); buttonsPanel = new JPanel(); buttonsPanel.setLayout(new BoxLayout(buttonsPanel, BoxLayout.X_AXIS)); @@ -178,8 +180,6 @@ public class ContributedPlatformTableCellJPanel extends JPanel { void update(JTable parentTable, Object value, boolean hasBuiltInRelease) { ContributedPlatformReleases releases = (ContributedPlatformReleases) value; - JTextPane description = makeNewDescription(); - // FIXME: happens on macosx, don't know why if (releases == null) { return; @@ -273,9 +273,6 @@ public class ContributedPlatformTableCellJPanel extends JPanel { } private JTextPane makeNewDescription() { - if (getComponentCount() > 0) { - remove(0); - } JTextPane description = new JTextPane(); description.setInheritsPopupMenu(true); Insets margin = description.getMargin(); @@ -299,7 +296,6 @@ public class ContributedPlatformTableCellJPanel extends JPanel { Base.openURL(e.getDescription()); } }); - add(description, 0); return description; }