मैं स्विंग जीयूआई पर काम कर रहा हूं और JSeperator
जोड़ने के बाद कुछ असामान्य और अवांछित अंतराल प्राप्त कर रहा हूं, कोई विचार उन्हें कैसे निकालना है? या इस अच्छी तरह से हासिल करने के लिए कोई अन्य विकल्प!जेएसपीरेटर का उपयोग करते समय असामान्य अंतराल - जावा
दृश्य विवरण
अंतराल से पहले JLabel
"स्पीड" और JSlider
के बाद स्पष्ट कर रहे हैं।
संबंधित कोड
control.setLayout(new BoxLayout(control, BoxLayout.X_AXIS));
...another code omitted...
control.add(orientation); //JLabel
control.add(norm); //JRadioButton
control.add(back); //JRadioButton
control.add(new JSeparator(SwingConstants.VERTICAL));
control.add(speedLabel); //JLabel
control.add(speed); //JSlider
control.add(new JSeparator(SwingConstants.VERTICAL));
control.add(turnOutLabel); //JLabel
control.add(right); //JRadioButton
control.add(straight); //JRadioButton
control.add(left); //JRadioButton
क्या मैं चाहता हूँ सब कुछ केंद्रित किया है करने के लिए और JSeperator द्वारा अलग है,
दृश्य विवरण
धन्यवाद।
क्या आपने क्षैतिज गोंद की कोशिश की है या अपने 'जेएसपरेटर' उदाहरणों के लिए खाली सीमा लागू की है? – mrkhrts
@mrkhrts गोंद मदद नहीं करता है, यह असंबद्ध अधिकतम के साथ एक और घटक है ;-) – kleopatra