我需要對齊Jdatechooser文本字段中的文本。它始終將文本(所選日期)與LEFT對齊,但我需要在右側。Jdatechooser text to ally
我都試過,但它不工作,
StartJCal.setAlignmentX(RIGHT_ALIGNMENT);
的setTextAlignment
方法不適用於Jdatechooser。
StartJCal = new JDateChooser();
StartJCal.setDateFormatString("yyyyMMdd");
StartJCal.setFont(new Font("Dialog", Font.PLAIN, 11));
StartJCal.setSize(new Dimension(105, 0));
這是一段代碼是using.How我可以對齊文本,請幫助
哪一個JDateChooser,用於AWT,GWT,JavaFX的,SWT或Swing,默認情況下有(J)微調 – mKorbel
@mKorbel其擺動 – user3164187
我認爲那裏(這裏有幾個版本,由各個作者)是JSpinner,搜索如何對齊此JComponent的文本(請參見API) – mKorbel