> Markdown version of [Ajout de vues](https://vaadin.com/docs/latest/fr/tools/swing/views). Section index: [llms.txt](https://vaadin.com/docs/latest/fr/tools/llms.txt)

# Ajout de vues Vaadin à l’intérieur d’une application Swing

## <a id="activation-des-vues-flow"></a>Activation des vues Flow

Dans votre application Vaadin, ajoutez l’annotation `@Bridge` à toutes les vues que vous souhaitez afficher à l’intérieur de votre application Swing. Vous pouvez utiliser la méthode `isSwingRendered()` pour vérifier si une vue est affichée dans un navigateur normal ou à l’intérieur d’une application Swing, Par exemple :

```java
...
import com.vaadin.swingkit.server.Bridge;

@Route("example-view")
@Bridge
public class ExampleView extends HorizontalLayout {
    public ExampleView() {
      if (SwingVaadinServer.isSwingRendered()) {
        // Code which is run only if this view is rendered inside a Swing application
      }
    }
}
```

## <a id="rendu-des-vues-flow-dans-swing"></a>Rendu des vues Flow dans Swing

Une fois que vous avez préparé vos vues Flow, elles peuvent être rendues comme un composant dans votre application Swing. La classe `JVaadinPanel` étend le composant `Panel`, et peut être ajoutée à des layouts Swing standard. Vous pouvez vérifier quand la vue a été complètement rendue en utilisant la méthode `isReady()`. Par exemple :

```java
...
import com.vaadin.swingkit.client.SwingVaadinClient;
import com.vaadin.swingkit.client.JVaadinPanel;

...
    JVaadinPanel vaadinPanel = SwingVaadinClient.getBuilder().build("example-view");
    vaadinPanel.isReady();
...
```
