Skip to main content

All Questions

Tagged with
-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 ...
Tanu's user avatar
  • 1,612
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 ...
T_01's user avatar
  • 1,349
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....
Marc43's user avatar
  • 491
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 ...
Eric mansen's user avatar
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 ...
Rifat Bin Reza's user avatar
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 ...
heisenberg's user avatar
  • 1,944
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 { ...
WVrock's user avatar
  • 1,755
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 ...
Frakcool's user avatar
  • 11.1k
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 ...
user9349193413's user avatar
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 ...
natinusala's user avatar
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 ...
Debaprasad's user avatar
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 ...
Matt's user avatar
  • 191
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 ...
PeakGen's user avatar
  • 22.9k
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) { ...
Yusuf1494's user avatar
  • 352
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 ...
Alexander T. Kim's user avatar

15 30 50 per page