在 JOptionPane 中将文本向右对齐 [英] Align text to the right in JOptionPane
本文介绍了在 JOptionPane 中将文本向右对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在 JOptionPane 中将文本向右对齐?(我不想用JDialog)因为我想用阿拉伯语写一些句子
Is it possible to align the text to the right in JOptionPane? (I don't want to use JDialog) because I want to write some sentences in Arabic
推荐答案
创建一个 JPanel,在 JPanel 中对齐文本,然后添加 JPanel 作为 JOptionPane 的 Object 参数.或者使用 JDialog(为什么不希望使用其中之一?).
Create a JPanel, align your text in your JPanel and then add the JPanel as the Object parameter of the JOptionPane. Or use a JDialog (why the desire not to use one of these?).
这篇关于在 JOptionPane 中将文本向右对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文