User Profile
Collapse
-
Any links or some reading on how the layout would work? Because as it stands I can only add one jlabel. Basically what I want is the ability to have as many jlabels as possible in the container of jframe.... -
JLabel and Jframe
Ok so I have been working on this for a moment now and wondering how to add multiple jlabels to a jframe. the code looks like this:
[code=java]
JLabel jl = new JLabel("DVD ID #= " + dvd[0][0]); //Displays DVD id
JLabel j2 = new JLabel("Name of DVD = " + dvd[0][1]); //Displays dvd name
JFrame frame = new JFrame( "Matt's DVD's" ); // Sets... -
How exactly would I go about doing that? maybe a quick snippit of code to show me or perhaps a website that has a detailed showing because I am very new to java and cannot seem to make it work.Leave a comment:
-
Adding a JLabel to a JFrame
ok so far I have got:
Code:JFrame frame = new JFrame( "Matt's DVD's" ); frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); frame.setSize( 420, 170 ); // set frame size frame.setVisible( true ); // display frame JLabel label = new JLabel("Text Label");
-
Never too late. I am still stuck. LOL I read through the material given but it seemed way over my head. I am still in the hello world stage of java programming and need some solid info on how i would only allow even numbers to be input in a string or double rather.Leave a comment:
-
Thank you both. I will look into it. Yeah I meant I have a input string of numbers:
Code:System.out.print( "Please enter the employee hourly rate:\n" ); double hours = input.nextDouble();
Leave a comment:
-
Even Numbers
Hey guys and girls,
I am pretty well versed in perl, but am just learning Java and I was wondering if anyone could explain how I would ask for an input of only even numbers or maybe point me in the direction of some good reading.
No activity results to display
Show More
Leave a comment: