5 Topics

Member Avatar for
Member Avatar for phy2sma

I'm having problems adding a JPanel, which has a paintComponent in it, to a JFrame. If this is the only thing I add to the frame, it works. But as soon as I add a layout manager and add other components to the JFrame, it no longer shows the panel …

Member Avatar for JamesCherrill
0
229
Member Avatar for abyss776

I've been searching the internet for a way to specify the size of a component within a JPanel, but I haven't been able to find anything that has worked. The best answer I came across was to override the getPreferredSize(), getMaximumSize(), and getMinimumSize() methods of the component, but the component …

Member Avatar for abyss776
0
210
Member Avatar for mhariharasudan

Hi, I am a new Java Programmer.could you help me in resolving this. I am trying to created a JPanel withing a main JPanel. For the nested one, i have included Grid Layout and i am trying to add components to it dynamically. i.e i have added a combo box …

Member Avatar for mhariharasudan
0
1K
Member Avatar for superjj

I'm trying to learn java. Now I want to test the buttons, but I don't understand the part of the layout. Can't I just write button1.setLocation(50,50); or someting like that ??? Thanks in advance.

Member Avatar for JamesCherrill
0
99
Member Avatar for Taimoor Rana

Hello Guys, Im Using GridbagLayout as LayoutManager, but I am not able to place my button at top-right of my frame. I'm also attaching my current output and what i actually want to do. here's my code: [CODE]package projectilemotion; /** * * @author Taimoor */ import javax.swing.*; import java.awt.*; public …

Member Avatar for mKorbel
0
126

The End.