All Questions
16 questions
-1
votes
1
answer
47
views
Swing Layout with CardLayout
How can I have get the layout in picture ? Current issue I am facing is that I am able see the dropdown 1 and text box but I do not see the dropdown 2 and text box aligned to it displayed.
private ...
0
votes
2
answers
353
views
How to leave MouseListener on ChildComponent but correctly keep track of mouse enter and exit on parent?
I have a JPanel with a CardLayout and two cards. I want the layout to flip the cards each time the mouse enters or exits the panel.
This works fine unless one of the cards is a component that listens ...
0
votes
0
answers
224
views
Why pack() is not resizing both ways (size up and shrink) - Swing
I have a GUI with a JFrame with a JPanel that is being switched with a CardLayout manager. The code is this one:
import javax.swing.*;
import java.awt.*;
import java.util.ArrayList;
import java.util....
0
votes
1
answer
174
views
combining null layout with card layout [java]
I'm trying to combine the cardlayout function with the null layout.
However when i try to run the program it doesn't work. The buttons do not appear at the boundries i tell them. Am i doing something ...
1
vote
1
answer
193
views
Can I add multiple frames in CardLayout in Java?
I have five JFrames in my program. I want those to be in a CardLayout.
Suppose A is the main frame and B,C,D,E are sub-frames.
Now, I want to put four buttons in A which will open the sub-frames ...
0
votes
2
answers
440
views
(Card Layout) Setting Card Name of CardPanels for JComboBox
guys. My project's design is a combination of hard coded design and design made using the GUI Builder of Netbeans. I decided to use the GUI Builder for RAD and rapid designing since we're behind ...
1
vote
1
answer
624
views
JFrame getLayout method does not return set cardLayout
I am setting a CardLayout as the a JFrame's layout but when I call the getLayout method a border layout is returned.
import java.awt.CardLayout;
import javax.swing.JFrame;
public class SSCCE {
...
5
votes
1
answer
4k
views
CardLayout with different sizes
Well I'm having some troubles by making a CardLayout with different sizes on each card.
After reading The Use of Multiple JFrames: Good or Bad Practice? I noticed I was doing things in a way that is ...
3
votes
3
answers
2k
views
Scrollable JPanel in a CardLayout?
I have been looking for a way to add a vertical scroll bar to a JPanel that in turn is added to a CardLayout panel. I looked up all the posts around here that were concerned with implementing a ...
0
votes
0
answers
462
views
Align cards of CardLayout
I have a CardLayout with several "cards" into it. The thing is that not every card has the same size, so the main panel takes the size of the biggest card.
The problem is that the biggest card shows ...
0
votes
1
answer
318
views
CardLayout alignment is not proper
I am a beginner to java. In second cardpanel the username and password alignment is not coming properly. Is there any way to fix it? I would also like to know what is the disadvantage of using ...
0
votes
2
answers
116
views
Java, switching to specific cards not working
I am trying to make a simple app to switch between cards. I am using NetBeans 7.3 if it makes a difference. The program is also an applet.
Hopefully this question not too specific but I've literally ...
0
votes
2
answers
82
views
Issues in locating elements and re sizing
Please have a look at the following code
WizardPanel
package wizardGUI;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class WizardPanel extends JDialog
{
private ...
2
votes
0
answers
586
views
How can I call cardlayout.show from another class?
I'm trying to call the method cardlayout.show to class below.
protected void makelabeltxt(final String text, GridBagLayout gridbag, GridBagConstraints c, int width, int height, final String panel) {
...
1
vote
2
answers
4k
views
Java CardLayout Main Menu Problem
Ok so im working on this game in java called 8 bit chimera. Im working on the main menu right now but when im using the card layout the window wont open for some reason. Here is some code.
import ...