Changeset 627
- Timestamp:
- 12/16/13 16:14:07 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/widgets/JfxBrowser.java
r621 r627 4 4 import java.awt.Color; 5 5 import java.awt.Component; 6 import java.awt.Font; 6 7 import java.awt.Point; 7 8 import java.awt.event.ActionEvent; … … 19 20 20 21 import javax.swing.JButton; 22 import javax.swing.JLabel; 21 23 import javax.swing.JPanel; 22 24 import javax.swing.JTextField; 23 25 import javax.swing.JToolBar; 26 import javax.swing.SwingConstants; 24 27 import javax.swing.text.BadLocationException; 25 28 … … 245 248 this.add((Component) jfxPanel); 246 249 247 // Setting bg color to be the same as bg color of widgets when they're being dragged/resized248 this.setBackground(new Color(100, 100, 100));249 250 250 JavaFX.PlatformRunLater.invoke(null, new Runnable() { 251 251 @Override … … 256 256 } catch (Exception e) { 257 257 e.printStackTrace(); 258 } 258 // if this occurs JavaFX was probably missing 259 this.removeAll(); 260 JLabel label = new JLabel("<html><p style=\"text-align: center;\">Failed to load<br/>Most likely JavaFX could not be found<br/>Make sure you are running at least Java 7<br/>(Preferably Java 8)</p></html>"); 261 label.setHorizontalAlignment(SwingConstants.CENTER); 262 label.setForeground(Color.RED); 263 label.setFont(new Font("sans-serif", 0, 20)); 264 this.add(label); 265 } 266 267 // Setting bg color to be the same as bg color of widgets when they're being dragged/resized 268 this.setBackground(new Color(100, 100, 100)); 259 269 } 260 270
Note:
See TracChangeset
for help on using the changeset viewer.