0
如何修復此代碼以讀取阿姆哈拉語言?Swing GUI編碼讀取阿姆哈拉語字符
import java.awt.FlowLayout;
import javax.swing.JButton;`
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
public class Gui {
public static void main(String[] args) {
SwingUtilities.invokeLater(() -> new Gui().start());
}
public void start() {
JFrame frame = new JFrame(" አማረኛ ");
JButton btn = new JButton(" ስላም ");
JButton btn2 = new JButton(" ሃይ");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(new FlowLayout(FlowLayout.LEFT));
frame.getContentPane().add(btn);
frame.getContentPane().add(btn2);
frame.setSize(250, 220);
frame.setVisible(true);
}
}
您可能需要將外觀和感覺字體更改爲支持您要顯示的字符集的東西 - 並/或使用系統外觀 – MadProgrammer