![]() Resbundle = ResourceBundle.getBundle ("strings", Locale.getDefault()) ![]() Static final JMenuBar mainMenuBar = new JMenuBar() Protected Action newAction, openAction, closeAction, saveAction, saveAsAction, undoAction, cutAction, copyAction, pasteAction, clearAction, selectAllAction Private Application fApplication = Application.getApplication() Private Font font = new Font("calibri", Font.BOLD, 36) Public class railsservermanager extends JFrame JFrameFoo frame = new JFrameFoo("JFrameFoo") įtDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) SetPreferredSize(new Dimension(310, 150)) JLabel apptitle = new JLabel("Frame Constructor") JButton stopserver = new JButton("Stop") JButton startserver = new JButton("Start") To do this, either use the "code" button at the top of the forum Message editor or place the tag at the top of your block of code and the tag at the bottom, like so:Īlso, rather than setting size, you may do well to pack your jframe.Ĭontainer primar圜ontainer = this.getContentPane() įlowLayout primaryLayout = new FlowLayout() Remember, the code must be compilable and runnable for many of us to be able to understand it fully.Īlso, when posting your code, please use code tags so that your code will retain its formatting and be readable. For more info on SSCCEs please look here: We don't want to see all of it, but rather you should condense your code into the smallest bit that still compiles, has no extra code that's not relevant to your problem, but still demonstrates your problem, in other words, an SSCCE (Short, Self Contained, Correct (Compilable), Example). Here is some of the code:Your best bet here is to show us more of your code. I'm just adding the elements to a Container using currently a FlowLayout. I'm not using a JPanel in the code at all. 1.7K Training / Learning / Certification.165.3K Java EE (Java Enterprise Edition).7.9K Oracle Database Express Edition (XE).3.8K Java and JavaScript in the Database.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |