पर शीर्ष मार्जिन क्या जेपीनल में 0 मार्जिन/पैडिंग जोड़ने का कोई तरीका है, इसलिए यह मानी जाने वाली WHOLE स्क्रीन को फिट करता है? (? पैनल के ऊपर कम जगह देखें कि यह यही कारण है कि कवर नहीं करता है और साथ ही?) 0 जेपीनेल
यहाँ जिस तरह से यह सेटअप है:
यहाँ है कि मैं क्या बात कर रहा हूँ है
labelStatus = new JLabel("\n\nSorry, the server crashed!");
labelStatus.setForeground(Color.WHITE.brighter());
statusPanel = new JPanel();
statusPanel.setBackground(Color.RED.darker());
statusPanel.add(labelStatus);
statusPanel.setPreferredSize(new Dimension(513,352));
और इस यह कैसे iniated हो जाता है:
} catch (Exception rwe) {
// System.exit(0);
game.add(statusPanel);
game.remove(yPanel);
game.remove(xPanel);
game.remove(roomPanel);
game.remove(userPanel);
game.remove(titlePanel);
game.remove(introPanel);
statusPanel.setOpaque(true);
labelStatus.setVisible(true);
System.out.println("Server went down -- crap!");
c.append("\nServer crashed!");
rwe.printStackTrace();
}
तो .. कैसे मुझे लगता है कि छोटा अंतराल ठीक करते हैं?