Blocks :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
Steps to reproduce: - Run the code below on HiDPI display on Windows - Select the text from the end to the beginning The selected text is shifted than the original one. ---------------------- import java.awt.BorderLayout; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.SwingUtilities; public class CheckTextSelection { private static final String TEXT = "aaaaaaaaaaaaaaaaaaaa"; public static void main(String[] args) { SwingUtilities.invokeLater(CheckTextSelection::createAndShowGUI); } private static void createAndShowGUI() { JFrame frame = new JFrame(); frame.setSize(300, 300); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel panel = new JPanel(new BorderLayout()); JTextField textField = new JTextField(TEXT); panel.add(textField); frame.getContentPane().add(panel); frame.setVisible(true); } } ----------------------
|