Le bouton sur JSlider vertical sur mon ordinateur Windows 7 (avec look-and-feel natif) est vraiment, vraiment minuscule dans les deux sens. Pas seulement maigre mais court aussi bien. alt text http://img101.imageshack.us/img101/8946/verticalsliderproblemwi.jpgJava Swing bug de rendu sur Windows 7 look-and-feel?
Est-ce que quelqu'un peut le confirmer? Devrais-je le signaler? Si oui, où? Merci!
Voici le code pour le programme d'échantillonnage (dans la capture d'écran):
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JSlider;
import javax.swing.SwingConstants;
import javax.swing.UIManager;
public class SliderTest
{
public static void main(String[] args)
{
// Set the look and feel to that of the system
try
{ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); }
catch (Exception e)
{ System.err.println(e); }
// Launch the GUI from the event dispatch thread
javax.swing.SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
JFrame window = new JFrame();
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel contentPane = new JPanel();
contentPane.add(new JSlider(SwingConstants.HORIZONTAL));
contentPane.add(new JSlider(SwingConstants.VERTICAL));
window.setContentPane(contentPane);
window.pack();
window.setLocationRelativeTo(null); // Center window
window.setVisible(true);
}
});
}
}
Je ne sais pas si c'est un bug, mais je vois la même chose. – foxwoods
Je pense que ça vaut la peine de rendre visible à Sun, euh, Oracle; P Je pense que je posterai quelque chose sur bugs.sun.com (je pense que c'est l'endroit où aller?). – Vimes
Cela semble normal sur Mac OS X 10.5.8 Java 1.6 pour tous les L & F installés. Est-ce un artefact de 'FlowLayout', la valeur par défaut de' JPanel'? – trashgod