SlideShare uma empresa Scribd logo
1 de 8
Baixar para ler offline
Cheick Ismael MAIGA
Cheick.ismo@gmail.com 1
Jtatoo : Api pour vos IHM
Introduction
Jtattoo se compose de plusieurs outils pour les applications Swing. Chacun d'entre eux permet aux
développeurs d'améliorer leur application avec une excellente interface utilisateur. L’api permet de
modifier les thèmes et d’ajouter des boutons close au jtabbePane et autre fonctionnalités.
Téléchargement et installation
Téléchargement
lien : http://www.jtattoo.net/Download.html
Installation
Comme tout jar l’installation se fait par l’ajout de la librairie à partir du built path .Il existe plusieur
méthode . Je vais vous présenter deux méthodes
1ère
méthode :
Clic droit sur le projet built path add external archives
Une boite de dialogue s’ouvre et vous demande le chemin ou se situe le jar télécharger
2ème
méthode :
Cette méthode consiste a crée un user library. L’avantage de cette méthode est que vous n’auriez
plus à aller cherche le jar eclipse s’aura d’office là ou chercher
Clic droit sur le projet built path addlibraries  user library (voir screenshots )
Cheick Ismael MAIGA
Cheick.ismo@gmail.com 2
Cheick Ismael MAIGA
Cheick.ismo@gmail.com 3
Une fois fini votre api est prêt à être utiliser
TP
Le TP consiste a crée une petite application et tester les différentes thème que nous propose l’api
Les différents lookAndFeel proposés sont :
 acryl : "com.jtattoo.plaf.acryl.AcrylLookAndFeel"
 aero: "com.jtattoo.plaf.aero.AeroLookAndFeel"
 aluminium: "com.jtattoo.plaf.aluminium.AluminiumLookAndFeel"
 bernstein: "com.jtattoo.plaf.bernstein.BernsteinLookAndFeel"
 fast : "com.jtattoo.plaf.fast.FastLookAndFeel"
 graphite : "com.jtattoo.plaf.graphite.GraphiteLookAndFeel"
 hifi : "com.jtattoo.plaf.hifi.HiFiLookAndFeel"
 luna : "com.jtattoo.plaf.luna.LunaLookAndFeel"
 mcwin : "com.jtattoo.plaf.mcwin.McWinLookAndFeel"
 mint : "com.jtattoo.plaf.mint.MintLookAndFeel"
 noire : "com.jtattoo.plaf.noire.NoireLookAndFeel"
 smart : "com.jtattoo.plaf.smart.SmartLookAndFeel"
 texture: "com.jtattoo.plaf.texture.TextureLookAndFeel"
Code source de l’appplication
package com.app.ihm;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.border.EmptyBorder;
import javax.swing.JToolBar;
public class Myapp extends JFrame {
private JPanel contentPane;
private static UIManager ui;//servira modifier le thème
private JTextArea textArea;
/**
* Launch the application.
* @throws UnsupportedLookAndFeelException
* @throws IllegalAccessException
* @throws InstantiationException
* @throws ClassNotFoundException
*/
Cheick Ismael MAIGA
Cheick.ismo@gmail.com 4
/*
* pour modifier le look il suffi de changer la de faire
* ui.setLookAndFeel(thème) thème sera changer
* par exemple par com.jtattoo.plaf.aero.AeroLookAndFeel
*/
public static void main(String[] args) throws ClassNotFoundException, InstantiationException,
IllegalAccessException, UnsupportedLookAndFeelException {
//permet de modifier le thème
//getUi().setLookAndFeel("com.jtattoo.plaf.aero.AeroLookAndFeel");
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Myapp frame = new Myapp();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();}}});}
/**
* Create the frame.
*/
public Myapp() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 401);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
contentPane.setLayout(new BorderLayout(0, 0));
setContentPane(contentPane);
JPanel panel = new JPanel();
contentPane.add(panel, BorderLayout.WEST);
JButton btnNewButton = new JButton("acyrl");
btnNewButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try {
getUi().setLookAndFeel("com.jtattoo.plaf.acryl.AcrylLookAndFeel");
textArea.setText("acryl");
} catch (ClassNotFoundException | InstantiationException
| IllegalAccessException
| UnsupportedLookAndFeelException e1) {
// TODO Auto-generated catch block
e1.printStackTrace(); }}});
JButton btnNewButton_1 = new JButton("aero");
btnNewButton_1.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try {
getUi().setLookAndFeel("com.jtattoo.plaf.aero.AeroLookAndFeel");
textArea.setText("aero");
} catch (ClassNotFoundException | InstantiationException
| IllegalAccessException
| UnsupportedLookAndFeelException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} }});
JButton btnNewButton_2 = new JButton("aluminium");
btnNewButton_2.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try {
getUi().setLookAndFeel("com.jtattoo.plaf.aluminium.AluminiumLookAndFeel");
textArea.setText("aluminium");
} catch (ClassNotFoundException | InstantiationException
| IllegalAccessException
| UnsupportedLookAndFeelException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();}}});
JButton btnNewButton_3 = new JButton("bernstein");
btnNewButton_3.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try {
Cheick Ismael MAIGA
Cheick.ismo@gmail.com 5
getUi().setLookAndFeel("com.jtattoo.plaf.bernstein.BernsteinLookAndFeel");
textArea.setText("bernstein");
} catch (ClassNotFoundException | InstantiationException
| IllegalAccessException
| UnsupportedLookAndFeelException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();}}});
JButton btnNewButton_4 = new JButton("fast");
btnNewButton_4.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try {
getUi().setLookAndFeel("com.jtattoo.plaf.fast.FastLookAndFeel");
textArea.setText("fast");
} catch (ClassNotFoundException | InstantiationException
| IllegalAccessException
| UnsupportedLookAndFeelException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});
JButton btnNewButton_5 = new JButton("graphite");
btnNewButton_5.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try {
getUi().setLookAndFeel("com.jtattoo.plaf.graphite.GraphiteLookAndFeel");
textArea.setText("graphite");
} catch (ClassNotFoundException | InstantiationException
| IllegalAccessException
| UnsupportedLookAndFeelException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();}}});
JButton btnNewButton_6 = new JButton("hifi");
btnNewButton_6.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try {
getUi().setLookAndFeel("com.jtattoo.plaf.hifi.HiFiLookAndFeel");
textArea.setText("hifi");
} catch (ClassNotFoundException | InstantiationException
| IllegalAccessException
| UnsupportedLookAndFeelException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();}}});
JButton btnNewButton_7 = new JButton("luna");
btnNewButton_7.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try {
getUi().setLookAndFeel("com.jtattoo.plaf.luna.LunaLookAndFeel");
textArea.setText("luna");
} catch (ClassNotFoundException | InstantiationException
| IllegalAccessException
| UnsupportedLookAndFeelException e1) {
// TODO Auto-generated catch block
e1.printStackTrace(); }}});
JButton btnNewButton_8 = new JButton("texture");
btnNewButton_8.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try {
Cheick Ismael MAIGA
Cheick.ismo@gmail.com 6
getUi().setLookAndFeel("com.jtattoo.plaf.texture.TextureLookAndFeel");
textArea.setText("texture");
} catch (ClassNotFoundException | InstantiationException
| IllegalAccessException
| UnsupportedLookAndFeelException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});
JButton btnNewButton_9 = new JButton("noire");
btnNewButton_9.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try {
getUi().setLookAndFeel("com.jtattoo.plaf.noire.NoireLookAndFeel");
textArea.setText("noire");
} catch (ClassNotFoundException | InstantiationException
| IllegalAccessException
| UnsupportedLookAndFeelException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();}}});
JButton btnNewButton_10 = new JButton("smart");
btnNewButton_10.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
try {
getUi().setLookAndFeel("com.jtattoo.plaf.smart.SmartLookAndFeel");
textArea.setText("smart");
} catch (ClassNotFoundException | InstantiationException
| IllegalAccessException
| UnsupportedLookAndFeelException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();}}});
GroupLayout gl_panel = new GroupLayout(panel);
gl_panel.setHorizontalGroup(
gl_panel.createParallelGroup(Alignment.LEADING)
.addGroup(Alignment.TRAILING, gl_panel.createSequentialGroup()
.addContainerGap()
.addGroup(gl_panel.createParallelGroup(Alignment.TRAILING)
.addComponent(btnNewButton_8, Alignment.LEADING,
GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)
.addComponent(btnNewButton_7, Alignment.LEADING,
GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)
.addComponent(btnNewButton_6, Alignment.LEADING,
GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)
.addComponent(btnNewButton_2, Alignment.LEADING,
GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btnNewButton_3, Alignment.LEADING,
GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)
.addComponent(btnNewButton_4, Alignment.LEADING,
GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)
.addComponent(btnNewButton_5, Alignment.LEADING,
GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)
.addComponent(btnNewButton_9, Alignment.LEADING,
GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)
.addComponent(btnNewButton_10, Alignment.LEADING,
GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)
.addComponent(btnNewButton_1, Alignment.LEADING,
GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)
.addComponent(btnNewButton, Alignment.LEADING,
GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE))
.addContainerGap())
);
gl_panel.setVerticalGroup(
gl_panel.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel.createSequentialGroup()
.addComponent(btnNewButton)
.addPreferredGap(ComponentPlacement.RELATED)
Cheick Ismael MAIGA
Cheick.ismo@gmail.com 7
.addComponent(btnNewButton_1)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(btnNewButton_2)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(btnNewButton_3)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(btnNewButton_4)
.addPreferredGap(ComponentPlacement.UNRELATED)
.addComponent(btnNewButton_5)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(btnNewButton_6)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(btnNewButton_7)
.addPreferredGap(ComponentPlacement.UNRELATED)
.addComponent(btnNewButton_8)
.addPreferredGap(ComponentPlacement.UNRELATED)
.addComponent(btnNewButton_9)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(btnNewButton_10)
.addContainerGap(25, Short.MAX_VALUE))
);
panel.setLayout(gl_panel);
JPanel panel_1 = new JPanel();
contentPane.add(panel_1, BorderLayout.CENTER);
textArea = new JTextArea();
GroupLayout gl_panel_1 = new GroupLayout(panel_1);
gl_panel_1.setHorizontalGroup(
gl_panel_1.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel_1.createSequentialGroup()
.addContainerGap()
.addComponent(textArea, GroupLayout.DEFAULT_SIZE, 296,
Short.MAX_VALUE)
.addGap(19))
);
gl_panel_1.setVerticalGroup(
gl_panel_1.createParallelGroup(Alignment.LEADING)
.addGroup(gl_panel_1.createSequentialGroup()
.addGap(38)
.addComponent(textArea, GroupLayout.DEFAULT_SIZE, 320,
Short.MAX_VALUE)
.addContainerGap())
);
panel_1.setLayout(gl_panel_1);
}
public static UIManager getUi() {
return ui;}
public void setUi(UIManager ui) {
this.ui = ui;}}
Figure 1:Thème par défaut
Cheick Ismael MAIGA
Cheick.ismo@gmail.com 8
Screenshots de quelques lookAndFeels de JTatoo
Figure 2 Thème Acryl
Figure 3 thème texture
Figure 4 thème aero

Mais conteúdo relacionado

Mais procurados

Slide8appletv2 091028110313-phpapp01
Slide8appletv2 091028110313-phpapp01Slide8appletv2 091028110313-phpapp01
Slide8appletv2 091028110313-phpapp01
Abhishek Khune
 
Java applet basics
Java applet basicsJava applet basics
Java applet basics
Sunil Pandey
 
Google Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification GoogleGoogle Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification Google
Mathias Seguy
 
Keep your Wicket application in production
Keep your Wicket application in productionKeep your Wicket application in production
Keep your Wicket application in production
Martijn Dashorst
 

Mais procurados (20)

iOS Automation: XCUITest + Gherkin
iOS Automation: XCUITest + GherkiniOS Automation: XCUITest + Gherkin
iOS Automation: XCUITest + Gherkin
 
B.Sc. III(VI Sem) Advance Java Unit2: Appet
B.Sc. III(VI Sem) Advance Java Unit2: AppetB.Sc. III(VI Sem) Advance Java Unit2: Appet
B.Sc. III(VI Sem) Advance Java Unit2: Appet
 
Introducing PanelKit
Introducing PanelKitIntroducing PanelKit
Introducing PanelKit
 
Advanced Dagger talk from 360andev
Advanced Dagger talk from 360andevAdvanced Dagger talk from 360andev
Advanced Dagger talk from 360andev
 
1 aleksandr gritsevski - attd example using
1   aleksandr gritsevski - attd example using1   aleksandr gritsevski - attd example using
1 aleksandr gritsevski - attd example using
 
Slide8appletv2 091028110313-phpapp01
Slide8appletv2 091028110313-phpapp01Slide8appletv2 091028110313-phpapp01
Slide8appletv2 091028110313-phpapp01
 
Android Unit Testing With Robolectric
Android Unit Testing With RobolectricAndroid Unit Testing With Robolectric
Android Unit Testing With Robolectric
 
Uploading files using selenium web driver
Uploading files using selenium web driverUploading files using selenium web driver
Uploading files using selenium web driver
 
Java applet basics
Java applet basicsJava applet basics
Java applet basics
 
Everything You (N)ever Wanted to Know about Testing View Controllers
Everything You (N)ever Wanted to Know about Testing View ControllersEverything You (N)ever Wanted to Know about Testing View Controllers
Everything You (N)ever Wanted to Know about Testing View Controllers
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to java
 
Google Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification GoogleGoogle Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification Google
 
How to build twitter bot using golang from scratch
How to build twitter bot using golang from scratchHow to build twitter bot using golang from scratch
How to build twitter bot using golang from scratch
 
Jmeter memory profiling, server-side monitoring, memory and cpu monitoring
Jmeter memory profiling, server-side monitoring, memory and cpu monitoringJmeter memory profiling, server-side monitoring, memory and cpu monitoring
Jmeter memory profiling, server-side monitoring, memory and cpu monitoring
 
Keep your Wicket application in production
Keep your Wicket application in productionKeep your Wicket application in production
Keep your Wicket application in production
 
Android ui layouts ,cntls,webservices examples codes
Android ui layouts ,cntls,webservices examples codesAndroid ui layouts ,cntls,webservices examples codes
Android ui layouts ,cntls,webservices examples codes
 
Quick: Better Tests via Incremental Setup
Quick: Better Tests via Incremental SetupQuick: Better Tests via Incremental Setup
Quick: Better Tests via Incremental Setup
 
Contextual communications and why you should care - Droidcon DE
Contextual communications and why you should care - Droidcon DEContextual communications and why you should care - Droidcon DE
Contextual communications and why you should care - Droidcon DE
 
Easy mock
Easy mockEasy mock
Easy mock
 
Automated testing of mobile applications on multiple platforms
Automated testing of mobile applications on multiple platformsAutomated testing of mobile applications on multiple platforms
Automated testing of mobile applications on multiple platforms
 

Destaque

Eucharistic congress 1932
Eucharistic congress 1932Eucharistic congress 1932
Eucharistic congress 1932
mrdowdican
 
Psicomotricitat al pati 1
Psicomotricitat al pati 1Psicomotricitat al pati 1
Psicomotricitat al pati 1
Mercè Gimeno
 
2014 10-26-30ste rbs-tocht
2014 10-26-30ste rbs-tocht2014 10-26-30ste rbs-tocht
2014 10-26-30ste rbs-tocht
Rbs Jabbeke
 
2014 12-30-4de doenkerezeswekentocht
2014 12-30-4de doenkerezeswekentocht2014 12-30-4de doenkerezeswekentocht
2014 12-30-4de doenkerezeswekentocht
Rbs Jabbeke
 
Excursió a can bordoi
Excursió a can bordoiExcursió a can bordoi
Excursió a can bordoi
Mercè Gimeno
 
Публичный отчёт ГБОУ Школа № 1028 за 2016 год
Публичный отчёт ГБОУ Школа № 1028 за 2016 год Публичный отчёт ГБОУ Школа № 1028 за 2016 год
Публичный отчёт ГБОУ Школа № 1028 за 2016 год
oznob
 
Vee's playlist
Vee's playlistVee's playlist
Vee's playlist
quinnkov
 

Destaque (20)

Eucharistic congress 1932
Eucharistic congress 1932Eucharistic congress 1932
Eucharistic congress 1932
 
Can HIEs Really Achieve Financial Sustainability: A Case Study and Discussion...
Can HIEs Really Achieve Financial Sustainability: A Case Study and Discussion...Can HIEs Really Achieve Financial Sustainability: A Case Study and Discussion...
Can HIEs Really Achieve Financial Sustainability: A Case Study and Discussion...
 
Asma ilahiyyah
Asma ilahiyyahAsma ilahiyyah
Asma ilahiyyah
 
Altivar18 Lang: Deutsch - ENg- Spanish - French
Altivar18 Lang: Deutsch - ENg- Spanish - FrenchAltivar18 Lang: Deutsch - ENg- Spanish - French
Altivar18 Lang: Deutsch - ENg- Spanish - French
 
A3 paronimy
A3 paronimyA3 paronimy
A3 paronimy
 
WTM Fresh 2013, Sugarcake pitch
WTM Fresh 2013, Sugarcake pitchWTM Fresh 2013, Sugarcake pitch
WTM Fresh 2013, Sugarcake pitch
 
Psicomotricitat al pati 1
Psicomotricitat al pati 1Psicomotricitat al pati 1
Psicomotricitat al pati 1
 
Портирование C++ приложений на FLASCC: опыт Unreal Engine 3. Павел Наказненко...
Портирование C++ приложений на FLASCC: опыт Unreal Engine 3. Павел Наказненко...Портирование C++ приложений на FLASCC: опыт Unreal Engine 3. Павел Наказненко...
Портирование C++ приложений на FLASCC: опыт Unreal Engine 3. Павел Наказненко...
 
Les metamorphose1
Les metamorphose1Les metamorphose1
Les metamorphose1
 
2014 10-26-30ste rbs-tocht
2014 10-26-30ste rbs-tocht2014 10-26-30ste rbs-tocht
2014 10-26-30ste rbs-tocht
 
2014 12-30-4de doenkerezeswekentocht
2014 12-30-4de doenkerezeswekentocht2014 12-30-4de doenkerezeswekentocht
2014 12-30-4de doenkerezeswekentocht
 
Tobogans tallers
Tobogans tallersTobogans tallers
Tobogans tallers
 
Teacher Nard - Head teacher of UV ESL Center
Teacher Nard - Head teacher of UV ESL Center Teacher Nard - Head teacher of UV ESL Center
Teacher Nard - Head teacher of UV ESL Center
 
Excursió a can bordoi
Excursió a can bordoiExcursió a can bordoi
Excursió a can bordoi
 
Публичный отчёт ГБОУ Школа № 1028 за 2016 год
Публичный отчёт ГБОУ Школа № 1028 за 2016 год Публичный отчёт ГБОУ Школа № 1028 за 2016 год
Публичный отчёт ГБОУ Школа № 1028 за 2016 год
 
Cavalls
CavallsCavalls
Cavalls
 
Evaluation of sources
Evaluation of sourcesEvaluation of sources
Evaluation of sources
 
Kako redizajnom telefonskih govornica unaprijediti turizam?
Kako redizajnom telefonskih govornica unaprijediti turizam?Kako redizajnom telefonskih govornica unaprijediti turizam?
Kako redizajnom telefonskih govornica unaprijediti turizam?
 
The Great Migration: Moving First Generation Digital Texts to HathiTrust: Dig...
The Great Migration: Moving First Generation Digital Texts to HathiTrust: Dig...The Great Migration: Moving First Generation Digital Texts to HathiTrust: Dig...
The Great Migration: Moving First Generation Digital Texts to HathiTrust: Dig...
 
Vee's playlist
Vee's playlistVee's playlist
Vee's playlist
 

Semelhante a Tuto jtatoo

package buttongui; import static com.sun.deploy.config.JREInf.pdf
package buttongui; import static com.sun.deploy.config.JREInf.pdfpackage buttongui; import static com.sun.deploy.config.JREInf.pdf
package buttongui; import static com.sun.deploy.config.JREInf.pdf
arjuntiwari586
 
I am getting a syntax error. I cant seem to find whats causing t.pdf
I am getting a syntax error. I cant seem to find whats causing t.pdfI am getting a syntax error. I cant seem to find whats causing t.pdf
I am getting a syntax error. I cant seem to find whats causing t.pdf
fashionfolionr
 
UNIT 5-JavaFX Event Handling, Controls and Components.pdf
UNIT 5-JavaFX Event Handling, Controls and Components.pdfUNIT 5-JavaFX Event Handling, Controls and Components.pdf
UNIT 5-JavaFX Event Handling, Controls and Components.pdf
SakkaravarthiS1
 

Semelhante a Tuto jtatoo (20)

What do you mean it needs to be Java based? How jython saved the day.
What do you mean it needs to be Java based? How jython saved the day.What do you mean it needs to be Java based? How jython saved the day.
What do you mean it needs to be Java based? How jython saved the day.
 
Groovy-er desktop applications with Griffon
Groovy-er desktop applications with GriffonGroovy-er desktop applications with Griffon
Groovy-er desktop applications with Griffon
 
Groovy-er Desktop Applications With Griffon
Groovy-er Desktop Applications With GriffonGroovy-er Desktop Applications With Griffon
Groovy-er Desktop Applications With Griffon
 
GUI Programming with Java
GUI Programming with JavaGUI Programming with Java
GUI Programming with Java
 
package buttongui; import static com.sun.deploy.config.JREInf.pdf
package buttongui; import static com.sun.deploy.config.JREInf.pdfpackage buttongui; import static com.sun.deploy.config.JREInf.pdf
package buttongui; import static com.sun.deploy.config.JREInf.pdf
 
Applet Architecture - Introducing Java Applets
Applet Architecture - Introducing Java AppletsApplet Architecture - Introducing Java Applets
Applet Architecture - Introducing Java Applets
 
SWTBot Tutorial
SWTBot TutorialSWTBot Tutorial
SWTBot Tutorial
 
Basic swing
Basic swingBasic swing
Basic swing
 
I am getting a syntax error. I cant seem to find whats causing t.pdf
I am getting a syntax error. I cant seem to find whats causing t.pdfI am getting a syntax error. I cant seem to find whats causing t.pdf
I am getting a syntax error. I cant seem to find whats causing t.pdf
 
11basic Swing
11basic Swing11basic Swing
11basic Swing
 
Will it blend? Java agents and OSGi
Will it blend? Java agents and OSGiWill it blend? Java agents and OSGi
Will it blend? Java agents and OSGi
 
java2 swing
java2 swingjava2 swing
java2 swing
 
CORE JAVA-2
CORE JAVA-2CORE JAVA-2
CORE JAVA-2
 
jQuery for web development
jQuery for web developmentjQuery for web development
jQuery for web development
 
Java awt
Java awtJava awt
Java awt
 
SwingApplet.pptx
SwingApplet.pptxSwingApplet.pptx
SwingApplet.pptx
 
Swtbot
SwtbotSwtbot
Swtbot
 
Java: GUI
Java: GUIJava: GUI
Java: GUI
 
Swing
SwingSwing
Swing
 
UNIT 5-JavaFX Event Handling, Controls and Components.pdf
UNIT 5-JavaFX Event Handling, Controls and Components.pdfUNIT 5-JavaFX Event Handling, Controls and Components.pdf
UNIT 5-JavaFX Event Handling, Controls and Components.pdf
 

Mais de Université de Sherbrooke (6)

Eclipse
EclipseEclipse
Eclipse
 
Rapport de fin d'etude
Rapport  de fin d'etudeRapport  de fin d'etude
Rapport de fin d'etude
 
How to install gwt and maven
How to install gwt and maven How to install gwt and maven
How to install gwt and maven
 
J2ee
J2eeJ2ee
J2ee
 
Presentation de gwt maven
Presentation de  gwt mavenPresentation de  gwt maven
Presentation de gwt maven
 
Atelier gwt
Atelier gwtAtelier gwt
Atelier gwt
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 

Tuto jtatoo

  • 1. Cheick Ismael MAIGA Cheick.ismo@gmail.com 1 Jtatoo : Api pour vos IHM Introduction Jtattoo se compose de plusieurs outils pour les applications Swing. Chacun d'entre eux permet aux développeurs d'améliorer leur application avec une excellente interface utilisateur. L’api permet de modifier les thèmes et d’ajouter des boutons close au jtabbePane et autre fonctionnalités. Téléchargement et installation Téléchargement lien : http://www.jtattoo.net/Download.html Installation Comme tout jar l’installation se fait par l’ajout de la librairie à partir du built path .Il existe plusieur méthode . Je vais vous présenter deux méthodes 1ère méthode : Clic droit sur le projet built path add external archives Une boite de dialogue s’ouvre et vous demande le chemin ou se situe le jar télécharger 2ème méthode : Cette méthode consiste a crée un user library. L’avantage de cette méthode est que vous n’auriez plus à aller cherche le jar eclipse s’aura d’office là ou chercher Clic droit sur le projet built path addlibraries  user library (voir screenshots )
  • 3. Cheick Ismael MAIGA Cheick.ismo@gmail.com 3 Une fois fini votre api est prêt à être utiliser TP Le TP consiste a crée une petite application et tester les différentes thème que nous propose l’api Les différents lookAndFeel proposés sont :  acryl : "com.jtattoo.plaf.acryl.AcrylLookAndFeel"  aero: "com.jtattoo.plaf.aero.AeroLookAndFeel"  aluminium: "com.jtattoo.plaf.aluminium.AluminiumLookAndFeel"  bernstein: "com.jtattoo.plaf.bernstein.BernsteinLookAndFeel"  fast : "com.jtattoo.plaf.fast.FastLookAndFeel"  graphite : "com.jtattoo.plaf.graphite.GraphiteLookAndFeel"  hifi : "com.jtattoo.plaf.hifi.HiFiLookAndFeel"  luna : "com.jtattoo.plaf.luna.LunaLookAndFeel"  mcwin : "com.jtattoo.plaf.mcwin.McWinLookAndFeel"  mint : "com.jtattoo.plaf.mint.MintLookAndFeel"  noire : "com.jtattoo.plaf.noire.NoireLookAndFeel"  smart : "com.jtattoo.plaf.smart.SmartLookAndFeel"  texture: "com.jtattoo.plaf.texture.TextureLookAndFeel" Code source de l’appplication package com.app.ihm; import java.awt.BorderLayout; import java.awt.EventQueue; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.GroupLayout; import javax.swing.GroupLayout.Alignment; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextArea; import javax.swing.LayoutStyle.ComponentPlacement; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import javax.swing.border.EmptyBorder; import javax.swing.JToolBar; public class Myapp extends JFrame { private JPanel contentPane; private static UIManager ui;//servira modifier le thème private JTextArea textArea; /** * Launch the application. * @throws UnsupportedLookAndFeelException * @throws IllegalAccessException * @throws InstantiationException * @throws ClassNotFoundException */
  • 4. Cheick Ismael MAIGA Cheick.ismo@gmail.com 4 /* * pour modifier le look il suffi de changer la de faire * ui.setLookAndFeel(thème) thème sera changer * par exemple par com.jtattoo.plaf.aero.AeroLookAndFeel */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException { //permet de modifier le thème //getUi().setLookAndFeel("com.jtattoo.plaf.aero.AeroLookAndFeel"); EventQueue.invokeLater(new Runnable() { public void run() { try { Myapp frame = new Myapp(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace();}}});} /** * Create the frame. */ public Myapp() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 450, 401); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); contentPane.setLayout(new BorderLayout(0, 0)); setContentPane(contentPane); JPanel panel = new JPanel(); contentPane.add(panel, BorderLayout.WEST); JButton btnNewButton = new JButton("acyrl"); btnNewButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { getUi().setLookAndFeel("com.jtattoo.plaf.acryl.AcrylLookAndFeel"); textArea.setText("acryl"); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e1) { // TODO Auto-generated catch block e1.printStackTrace(); }}}); JButton btnNewButton_1 = new JButton("aero"); btnNewButton_1.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { getUi().setLookAndFeel("com.jtattoo.plaf.aero.AeroLookAndFeel"); textArea.setText("aero"); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } }}); JButton btnNewButton_2 = new JButton("aluminium"); btnNewButton_2.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { getUi().setLookAndFeel("com.jtattoo.plaf.aluminium.AluminiumLookAndFeel"); textArea.setText("aluminium"); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e1) { // TODO Auto-generated catch block e1.printStackTrace();}}}); JButton btnNewButton_3 = new JButton("bernstein"); btnNewButton_3.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try {
  • 5. Cheick Ismael MAIGA Cheick.ismo@gmail.com 5 getUi().setLookAndFeel("com.jtattoo.plaf.bernstein.BernsteinLookAndFeel"); textArea.setText("bernstein"); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e1) { // TODO Auto-generated catch block e1.printStackTrace();}}}); JButton btnNewButton_4 = new JButton("fast"); btnNewButton_4.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { getUi().setLookAndFeel("com.jtattoo.plaf.fast.FastLookAndFeel"); textArea.setText("fast"); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } }); JButton btnNewButton_5 = new JButton("graphite"); btnNewButton_5.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { getUi().setLookAndFeel("com.jtattoo.plaf.graphite.GraphiteLookAndFeel"); textArea.setText("graphite"); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e1) { // TODO Auto-generated catch block e1.printStackTrace();}}}); JButton btnNewButton_6 = new JButton("hifi"); btnNewButton_6.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { getUi().setLookAndFeel("com.jtattoo.plaf.hifi.HiFiLookAndFeel"); textArea.setText("hifi"); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e1) { // TODO Auto-generated catch block e1.printStackTrace();}}}); JButton btnNewButton_7 = new JButton("luna"); btnNewButton_7.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { getUi().setLookAndFeel("com.jtattoo.plaf.luna.LunaLookAndFeel"); textArea.setText("luna"); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e1) { // TODO Auto-generated catch block e1.printStackTrace(); }}}); JButton btnNewButton_8 = new JButton("texture"); btnNewButton_8.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try {
  • 6. Cheick Ismael MAIGA Cheick.ismo@gmail.com 6 getUi().setLookAndFeel("com.jtattoo.plaf.texture.TextureLookAndFeel"); textArea.setText("texture"); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } }); JButton btnNewButton_9 = new JButton("noire"); btnNewButton_9.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { getUi().setLookAndFeel("com.jtattoo.plaf.noire.NoireLookAndFeel"); textArea.setText("noire"); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e1) { // TODO Auto-generated catch block e1.printStackTrace();}}}); JButton btnNewButton_10 = new JButton("smart"); btnNewButton_10.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { getUi().setLookAndFeel("com.jtattoo.plaf.smart.SmartLookAndFeel"); textArea.setText("smart"); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e1) { // TODO Auto-generated catch block e1.printStackTrace();}}}); GroupLayout gl_panel = new GroupLayout(panel); gl_panel.setHorizontalGroup( gl_panel.createParallelGroup(Alignment.LEADING) .addGroup(Alignment.TRAILING, gl_panel.createSequentialGroup() .addContainerGap() .addGroup(gl_panel.createParallelGroup(Alignment.TRAILING) .addComponent(btnNewButton_8, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE) .addComponent(btnNewButton_7, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE) .addComponent(btnNewButton_6, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE) .addComponent(btnNewButton_2, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnNewButton_3, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE) .addComponent(btnNewButton_4, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE) .addComponent(btnNewButton_5, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE) .addComponent(btnNewButton_9, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE) .addComponent(btnNewButton_10, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE) .addComponent(btnNewButton_1, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE) .addComponent(btnNewButton, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)) .addContainerGap()) ); gl_panel.setVerticalGroup( gl_panel.createParallelGroup(Alignment.LEADING) .addGroup(gl_panel.createSequentialGroup() .addComponent(btnNewButton) .addPreferredGap(ComponentPlacement.RELATED)
  • 7. Cheick Ismael MAIGA Cheick.ismo@gmail.com 7 .addComponent(btnNewButton_1) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(btnNewButton_2) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(btnNewButton_3) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(btnNewButton_4) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(btnNewButton_5) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(btnNewButton_6) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(btnNewButton_7) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(btnNewButton_8) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(btnNewButton_9) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(btnNewButton_10) .addContainerGap(25, Short.MAX_VALUE)) ); panel.setLayout(gl_panel); JPanel panel_1 = new JPanel(); contentPane.add(panel_1, BorderLayout.CENTER); textArea = new JTextArea(); GroupLayout gl_panel_1 = new GroupLayout(panel_1); gl_panel_1.setHorizontalGroup( gl_panel_1.createParallelGroup(Alignment.LEADING) .addGroup(gl_panel_1.createSequentialGroup() .addContainerGap() .addComponent(textArea, GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE) .addGap(19)) ); gl_panel_1.setVerticalGroup( gl_panel_1.createParallelGroup(Alignment.LEADING) .addGroup(gl_panel_1.createSequentialGroup() .addGap(38) .addComponent(textArea, GroupLayout.DEFAULT_SIZE, 320, Short.MAX_VALUE) .addContainerGap()) ); panel_1.setLayout(gl_panel_1); } public static UIManager getUi() { return ui;} public void setUi(UIManager ui) { this.ui = ui;}} Figure 1:Thème par défaut
  • 8. Cheick Ismael MAIGA Cheick.ismo@gmail.com 8 Screenshots de quelques lookAndFeels de JTatoo Figure 2 Thème Acryl Figure 3 thème texture Figure 4 thème aero