<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_191) on Wed Oct 31 14:02:15 UTC 2018 --> <title>JFXPanel (JavaFX 8)</title> <meta name="date" content="2018-10-31"> <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="JFXPanel (JavaFX 8)"; } } catch(err) { } //--> var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/JFXPanel.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">JavaFX 8</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev Class</li> <li><a href="../../../javafx/embed/swing/SwingFXUtils.html" title="class in javafx.embed.swing"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?javafx/embed/swing/JFXPanel.html" target="_top">Frames</a></li> <li><a href="JFXPanel.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li><a href="#nested.classes.inherited.from.class.javax.swing.JComponent">Nested</a> | </li> <li><a href="#fields.inherited.from.class.javax.swing.JComponent">Field</a> | </li> <li><a href="#constructor.summary">Constr</a> | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li><a href="#constructor.detail">Constr</a> | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">javafx.embed.swing</div> <h2 title="Class JFXPanel" class="title">Class JFXPanel</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>java.awt.Component</li> <li> <ul class="inheritance"> <li>java.awt.Container</li> <li> <ul class="inheritance"> <li>javax.swing.JComponent</li> <li> <ul class="inheritance"> <li>javafx.embed.swing.JFXPanel</li> </ul> </li> </ul> </li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd>java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable</dd> </dl> <hr> <br> <pre>public class <span class="typeNameLabel">JFXPanel</span> extends javax.swing.JComponent</pre> <div class="block"><code>JFXPanel</code> is a component to embed JavaFX content into Swing applications. The content to be displayed is specified with the <a href="../../../javafx/embed/swing/JFXPanel.html#setScene-javafx.scene.Scene-"><code>setScene(javafx.scene.Scene)</code></a> method that accepts an instance of JavaFX <code>Scene</code>. After the scene is assigned, it gets repainted automatically. All the input and focus events are forwarded to the scene transparently to the developer. <p> There are some restrictions related to <code>JFXPanel</code>. As a Swing component, it should only be accessed from the event dispatch thread, except the <a href="../../../javafx/embed/swing/JFXPanel.html#setScene-javafx.scene.Scene-"><code>setScene(javafx.scene.Scene)</code></a> method, which can be called either on the event dispatch thread or on the JavaFX application thread. <p> Here is a typical pattern how <code>JFXPanel</code> can used: <pre> public class Test { private static void initAndShowGUI() { // This method is invoked on Swing thread JFrame frame = new JFrame("FX"); final JFXPanel fxPanel = new JFXPanel(); frame.add(fxPanel); frame.setVisible(true); Platform.runLater(new Runnable() { @Override public void run() { initFX(fxPanel); } }); } private static void initFX(JFXPanel fxPanel) { // This method is invoked on JavaFX thread Scene scene = createScene(); fxPanel.setScene(scene); } public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { initAndShowGUI(); } }); } } </pre></div> <dl> <dt><span class="simpleTagLabel">Since:</span></dt> <dd>JavaFX 2.0</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../serialized-form.html#javafx.embed.swing.JFXPanel">Serialized Form</a></dd> </dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ======== NESTED CLASS SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="nested.class.summary"> <!-- --> </a> <h3>Nested Class Summary</h3> <ul class="blockList"> <li class="blockList"><a name="nested.classes.inherited.from.class.javax.swing.JComponent"> <!-- --> </a> <h3>Nested classes/interfaces inherited from class javax.swing.JComponent</h3> <code>javax.swing.JComponent.AccessibleJComponent</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="nested.classes.inherited.from.class.java.awt.Container"> <!-- --> </a> <h3>Nested classes/interfaces inherited from class java.awt.Container</h3> <code>java.awt.Container.AccessibleAWTContainer</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="nested.classes.inherited.from.class.java.awt.Component"> <!-- --> </a> <h3>Nested classes/interfaces inherited from class java.awt.Component</h3> <code>java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy</code></li> </ul> </li> </ul> <!-- =========== FIELD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="field.summary"> <!-- --> </a> <h3>Field Summary</h3> <ul class="blockList"> <li class="blockList"><a name="fields.inherited.from.class.javax.swing.JComponent"> <!-- --> </a> <h3>Fields inherited from class javax.swing.JComponent</h3> <code>listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="fields.inherited.from.class.java.awt.Component"> <!-- --> </a> <h3>Fields inherited from class java.awt.Component</h3> <code>accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="fields.inherited.from.class.java.awt.image.ImageObserver"> <!-- --> </a> <h3>Fields inherited from interface java.awt.image.ImageObserver</h3> <code>ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH</code></li> </ul> </li> </ul> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd"> </span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#JFXPanel--">JFXPanel</a></span>()</code> <div class="block">Creates a new <code>JFXPanel</code> object.</div> </td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#addNotify--">addNotify</a></span>()</code> <div class="block">Notifies this component that it now has a parent component.</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>java.awt.im.InputMethodRequests</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#getInputMethodRequests--">getInputMethodRequests</a></span>()</code> </td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code>java.awt.Dimension</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#getPreferredSize--">getPreferredSize</a></span>()</code> <div class="block">Returns the preferred size of this <code>JFXPanel</code>, either previously set with <code>JComponent.setPreferredSize(Dimension)</code> or based on the content of the JavaFX scene attached to this <code>JFXPanel</code>.</div> </td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code><a href="../../../javafx/scene/Scene.html" title="class in javafx.scene">Scene</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#getScene--">getScene</a></span>()</code> <div class="block">Returns the JavaFX scene attached to this <code>JFXPanel</code>.</div> </td> </tr> <tr id="i4" class="altColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#isOpaque--">isOpaque</a></span>()</code> <div class="block"><code>JFXPanel</code>'s opacity is controlled by the JavaFX content which is displayed in this component, so this method overrides <code>JComponent.isOpaque()</code> to always return a <code>false</code> value.</div> </td> </tr> <tr id="i5" class="rowColor"> <td class="colFirst"><code>protected void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#paintComponent-java.awt.Graphics-">paintComponent</a></span>(java.awt.Graphics g)</code> <div class="block">Overrides the <code>JComponent.paintComponent(Graphics)</code> method to paint the content of the JavaFX scene attached to this <code>JFXpanel</code>.</div> </td> </tr> <tr id="i6" class="altColor"> <td class="colFirst"><code>protected void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#processComponentEvent-java.awt.event.ComponentEvent-">processComponentEvent</a></span>(java.awt.event.ComponentEvent e)</code> <div class="block">Overrides the <code>Component.processComponentEvent(ComponentEvent)</code> method to dispatch <code>ComponentEvent.COMPONENT_RESIZED</code> events to the JavaFX scene attached to this <code>JFXPanel</code>.</div> </td> </tr> <tr id="i7" class="rowColor"> <td class="colFirst"><code>protected void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#processFocusEvent-java.awt.event.FocusEvent-">processFocusEvent</a></span>(java.awt.event.FocusEvent e)</code> <div class="block">Overrides the <code>Component.processFocusEvent(FocusEvent)</code> method to dispatch focus events to the JavaFX scene attached to this <code>JFXPanel</code>.</div> </td> </tr> <tr id="i8" class="altColor"> <td class="colFirst"><code>protected void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#processHierarchyBoundsEvent-java.awt.event.HierarchyEvent-">processHierarchyBoundsEvent</a></span>(java.awt.event.HierarchyEvent e)</code> <div class="block">Overrides the <code>Component.processHierarchyBoundsEvent(HierarchyEvent)</code> method to process <code>HierarchyEvent.ANCESTOR_MOVED</code> events and update the JavaFX scene location to match the <code>JFXPanel</code> location on the screen.</div> </td> </tr> <tr id="i9" class="rowColor"> <td class="colFirst"><code>protected void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#processHierarchyEvent-java.awt.event.HierarchyEvent-">processHierarchyEvent</a></span>(java.awt.event.HierarchyEvent e)</code> </td> </tr> <tr id="i10" class="altColor"> <td class="colFirst"><code>protected void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#processInputMethodEvent-java.awt.event.InputMethodEvent-">processInputMethodEvent</a></span>(java.awt.event.InputMethodEvent e)</code> </td> </tr> <tr id="i11" class="rowColor"> <td class="colFirst"><code>protected void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#processKeyEvent-java.awt.event.KeyEvent-">processKeyEvent</a></span>(java.awt.event.KeyEvent e)</code> <div class="block">Overrides the <code>Component.processKeyEvent(KeyEvent)</code> method to dispatch the key event to the JavaFX scene attached to this <code>JFXPanel</code>.</div> </td> </tr> <tr id="i12" class="altColor"> <td class="colFirst"><code>protected void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#processMouseEvent-java.awt.event.MouseEvent-">processMouseEvent</a></span>(java.awt.event.MouseEvent e)</code> <div class="block">Overrides the <code>Component.processMouseEvent(MouseEvent)</code> method to dispatch the mouse event to the JavaFX scene attached to this <code>JFXPanel</code>.</div> </td> </tr> <tr id="i13" class="rowColor"> <td class="colFirst"><code>protected void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#processMouseMotionEvent-java.awt.event.MouseEvent-">processMouseMotionEvent</a></span>(java.awt.event.MouseEvent e)</code> <div class="block">Overrides the <code>Component.processMouseMotionEvent(MouseEvent)</code> method to dispatch the mouse motion event to the JavaFX scene attached to this <code>JFXPanel</code>.</div> </td> </tr> <tr id="i14" class="altColor"> <td class="colFirst"><code>protected void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#processMouseWheelEvent-java.awt.event.MouseWheelEvent-">processMouseWheelEvent</a></span>(java.awt.event.MouseWheelEvent e)</code> <div class="block">Overrides the <code>Component.processMouseWheelEvent(MouseWheelEvent)</code> method to dispatch the mouse wheel event to the JavaFX scene attached to this <code>JFXPanel</code>.</div> </td> </tr> <tr id="i15" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#removeNotify--">removeNotify</a></span>()</code> <div class="block">Notifies this component that it no longer has a parent component.</div> </td> </tr> <tr id="i16" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#setOpaque-boolean-">setOpaque</a></span>(boolean opaque)</code> <div class="block"><code>JFXPanel</code>'s opacity is controlled by the JavaFX content which is displayed in this component, so this method overrides <code>JComponent.setOpaque(boolean)</code> to only accept a <code>false</code> value.</div> </td> </tr> <tr id="i17" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../javafx/embed/swing/JFXPanel.html#setScene-javafx.scene.Scene-">setScene</a></span>(<a href="../../../javafx/scene/Scene.html" title="class in javafx.scene">Scene</a> newScene)</code> <div class="block">Attaches a <code>Scene</code> object to display in this <code>JFXPanel</code>.</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.javax.swing.JComponent"> <!-- --> </a> <h3>Methods inherited from class javax.swing.JComponent</h3> <code>addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.awt.Container"> <!-- --> </a> <h3>Methods inherited from class java.awt.Container</h3> <code>add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.awt.Component"> <!-- --> </a> <h3>Methods inherited from class java.awt.Component</h3> <code>action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="JFXPanel--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>JFXPanel</h4> <pre>public JFXPanel()</pre> <div class="block">Creates a new <code>JFXPanel</code> object. <p> <b>Implementation note</b>: when the first <code>JFXPanel</code> object is created, it implicitly initializes the JavaFX runtime. This is the preferred way to initialize JavaFX in Swing.</div> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="getScene--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getScene</h4> <pre>public <a href="../../../javafx/scene/Scene.html" title="class in javafx.scene">Scene</a> getScene()</pre> <div class="block">Returns the JavaFX scene attached to this <code>JFXPanel</code>.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the <code>Scene</code> attached to this <code>JFXPanel</code></dd> </dl> </li> </ul> <a name="setScene-javafx.scene.Scene-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setScene</h4> <pre>public void setScene(<a href="../../../javafx/scene/Scene.html" title="class in javafx.scene">Scene</a> newScene)</pre> <div class="block">Attaches a <code>Scene</code> object to display in this <code>JFXPanel</code>. This method can be called either on the event dispatch thread or the JavaFX application thread.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>newScene</code> - a scene to display in this <code>JFXpanel</code></dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><code>EventQueue.isDispatchThread()</code>, <a href="../../../javafx/application/Platform.html#isFxApplicationThread--"><code>Platform.isFxApplicationThread()</code></a></dd> </dl> </li> </ul> <a name="setOpaque-boolean-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setOpaque</h4> <pre>public final void setOpaque(boolean opaque)</pre> <div class="block"><code>JFXPanel</code>'s opacity is controlled by the JavaFX content which is displayed in this component, so this method overrides <code>JComponent.setOpaque(boolean)</code> to only accept a <code>false</code> value. If this method is called with a <code>true</code> value, no action is performed.</div> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>setOpaque</code> in class <code>javax.swing.JComponent</code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>opaque</code> - must be <code>false</code></dd> </dl> </li> </ul> <a name="isOpaque--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isOpaque</h4> <pre>public final boolean isOpaque()</pre> <div class="block"><code>JFXPanel</code>'s opacity is controlled by the JavaFX content which is displayed in this component, so this method overrides <code>JComponent.isOpaque()</code> to always return a <code>false</code> value.</div> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>isOpaque</code> in class <code>javax.swing.JComponent</code></dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>a <code>false</code> value</dd> </dl> </li> </ul> <a name="processMouseEvent-java.awt.event.MouseEvent-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>processMouseEvent</h4> <pre>protected void processMouseEvent(java.awt.event.MouseEvent e)</pre> <div class="block">Overrides the <code>Component.processMouseEvent(MouseEvent)</code> method to dispatch the mouse event to the JavaFX scene attached to this <code>JFXPanel</code>.</div> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>processMouseEvent</code> in class <code>javax.swing.JComponent</code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>e</code> - the mouse event to dispatch to the JavaFX scene</dd> </dl> </li> </ul> <a name="processMouseMotionEvent-java.awt.event.MouseEvent-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>processMouseMotionEvent</h4> <pre>protected void processMouseMotionEvent(java.awt.event.MouseEvent e)</pre> <div class="block">Overrides the <code>Component.processMouseMotionEvent(MouseEvent)</code> method to dispatch the mouse motion event to the JavaFX scene attached to this <code>JFXPanel</code>.</div> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>processMouseMotionEvent</code> in class <code>javax.swing.JComponent</code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>e</code> - the mouse motion event to dispatch to the JavaFX scene</dd> </dl> </li> </ul> <a name="processMouseWheelEvent-java.awt.event.MouseWheelEvent-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>processMouseWheelEvent</h4> <pre>protected void processMouseWheelEvent(java.awt.event.MouseWheelEvent e)</pre> <div class="block">Overrides the <code>Component.processMouseWheelEvent(MouseWheelEvent)</code> method to dispatch the mouse wheel event to the JavaFX scene attached to this <code>JFXPanel</code>.</div> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>processMouseWheelEvent</code> in class <code>java.awt.Component</code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>e</code> - the mouse wheel event to dispatch to the JavaFX scene</dd> </dl> </li> </ul> <a name="processKeyEvent-java.awt.event.KeyEvent-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>processKeyEvent</h4> <pre>protected void processKeyEvent(java.awt.event.KeyEvent e)</pre> <div class="block">Overrides the <code>Component.processKeyEvent(KeyEvent)</code> method to dispatch the key event to the JavaFX scene attached to this <code>JFXPanel</code>.</div> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>processKeyEvent</code> in class <code>javax.swing.JComponent</code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>e</code> - the key event to dispatch to the JavaFX scene</dd> </dl> </li> </ul> <a name="processComponentEvent-java.awt.event.ComponentEvent-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>processComponentEvent</h4> <pre>protected void processComponentEvent(java.awt.event.ComponentEvent e)</pre> <div class="block">Overrides the <code>Component.processComponentEvent(ComponentEvent)</code> method to dispatch <code>ComponentEvent.COMPONENT_RESIZED</code> events to the JavaFX scene attached to this <code>JFXPanel</code>. The JavaFX scene object is then resized to match the <code>JFXPanel</code> size.</div> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>processComponentEvent</code> in class <code>java.awt.Component</code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>e</code> - the component event to dispatch to the JavaFX scene</dd> </dl> </li> </ul> <a name="processHierarchyBoundsEvent-java.awt.event.HierarchyEvent-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>processHierarchyBoundsEvent</h4> <pre>protected void processHierarchyBoundsEvent(java.awt.event.HierarchyEvent e)</pre> <div class="block">Overrides the <code>Component.processHierarchyBoundsEvent(HierarchyEvent)</code> method to process <code>HierarchyEvent.ANCESTOR_MOVED</code> events and update the JavaFX scene location to match the <code>JFXPanel</code> location on the screen.</div> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>processHierarchyBoundsEvent</code> in class <code>java.awt.Component</code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>e</code> - the hierarchy bounds event to process</dd> </dl> </li> </ul> <a name="processHierarchyEvent-java.awt.event.HierarchyEvent-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>processHierarchyEvent</h4> <pre>protected void processHierarchyEvent(java.awt.event.HierarchyEvent e)</pre> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>processHierarchyEvent</code> in class <code>java.awt.Component</code></dd> </dl> </li> </ul> <a name="processFocusEvent-java.awt.event.FocusEvent-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>processFocusEvent</h4> <pre>protected void processFocusEvent(java.awt.event.FocusEvent e)</pre> <div class="block">Overrides the <code>Component.processFocusEvent(FocusEvent)</code> method to dispatch focus events to the JavaFX scene attached to this <code>JFXPanel</code>.</div> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>processFocusEvent</code> in class <code>java.awt.Component</code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>e</code> - the focus event to dispatch to the JavaFX scene</dd> </dl> </li> </ul> <a name="processInputMethodEvent-java.awt.event.InputMethodEvent-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>processInputMethodEvent</h4> <pre>protected void processInputMethodEvent(java.awt.event.InputMethodEvent e)</pre> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>processInputMethodEvent</code> in class <code>java.awt.Component</code></dd> </dl> </li> </ul> <a name="paintComponent-java.awt.Graphics-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>paintComponent</h4> <pre>protected void paintComponent(java.awt.Graphics g)</pre> <div class="block">Overrides the <code>JComponent.paintComponent(Graphics)</code> method to paint the content of the JavaFX scene attached to this <code>JFXpanel</code>.</div> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>paintComponent</code> in class <code>javax.swing.JComponent</code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>g</code> - the Graphics context in which to paint</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../javafx/embed/swing/JFXPanel.html#isOpaque--"><code>isOpaque()</code></a></dd> </dl> </li> </ul> <a name="getPreferredSize--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getPreferredSize</h4> <pre>public java.awt.Dimension getPreferredSize()</pre> <div class="block">Returns the preferred size of this <code>JFXPanel</code>, either previously set with <code>JComponent.setPreferredSize(Dimension)</code> or based on the content of the JavaFX scene attached to this <code>JFXPanel</code>.</div> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>getPreferredSize</code> in class <code>javax.swing.JComponent</code></dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>prefSize this <code>JFXPanel</code> preferred size</dd> </dl> </li> </ul> <a name="addNotify--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>addNotify</h4> <pre>public void addNotify()</pre> <div class="block">Notifies this component that it now has a parent component. When this method is invoked, the chain of parent components is set up with KeyboardAction event listeners.</div> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>addNotify</code> in class <code>javax.swing.JComponent</code></dd> </dl> </li> </ul> <a name="getInputMethodRequests--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getInputMethodRequests</h4> <pre>public java.awt.im.InputMethodRequests getInputMethodRequests()</pre> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>getInputMethodRequests</code> in class <code>java.awt.Component</code></dd> </dl> </li> </ul> <a name="removeNotify--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>removeNotify</h4> <pre>public void removeNotify()</pre> <div class="block">Notifies this component that it no longer has a parent component. When this method is invoked, any KeyboardActions set up in the the chain of parent components are removed.</div> <dl> <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> <dd><code>removeNotify</code> in class <code>javax.swing.JComponent</code></dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/JFXPanel.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">JavaFX 8</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev Class</li> <li><a href="../../../javafx/embed/swing/SwingFXUtils.html" title="class in javafx.embed.swing"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?javafx/embed/swing/JFXPanel.html" target="_top">Frames</a></li> <li><a href="JFXPanel.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li><a href="#nested.classes.inherited.from.class.javax.swing.JComponent">Nested</a> | </li> <li><a href="#fields.inherited.from.class.javax.swing.JComponent">Field</a> | </li> <li><a href="#constructor.summary">Constr</a> | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li><a href="#constructor.detail">Constr</a> | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small><font size="-1"><a href="http://bugreport.java.com/bugreport/" target="_blank">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="https://docs.oracle.com/javase/8/docs/index.html" target="_blank">Java SE Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> <a href="https://docs.oracle.com/javase/8/docs/legal/cpyr.html" target="_blank">Copyright</a> © 2008, 2018, Oracle and/or its affiliates. All rights reserved. Use is subject to <a href="http://download.oracle.com/otndocs/jcp/java_se-8-mrel-spec/license.html" target="_blank">license terms</a>. Also see the <a target="_blank" href="http://www.oracle.com/technetwork/java/redist-137594.html" target="_blank">documentation redistribution policy</a>.</font></small></p> </body> </html>