Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,634 members, 7,801,831 topics. Date: Friday, 19 April 2024 at 01:12 AM

Please Could You Help Me With This Java Challenge - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Please Could You Help Me With This Java Challenge (925 Views)

Help Me Solve This Java / Guys Pleaseeeee I Need To Understand This Java Thing! / Improve The Speed Of This Java Code. (2) (3) (4)

(1) (Reply) (Go Down)

Please Could You Help Me With This Java Challenge by chukxy: 9:40am On Jul 26, 2010
I uploaded some pictures to database(mysql) with id numbers. If I want to retrieve the picture with id no, it works very ok as
shown on the screen shot attached(chuksproj2.jpg) but the challenge is I want to retrieve all the pictures in the database with the id number using table to display them at once. It worked but the picture did not show on the column as it is suppose to be as shown(chuksproj3.jpg).

The second challenge I am facing is that when I jar an application connected to database, It does not retrieve results from the database but If I run
the same from the command line, it works on fine. I was thinking may be I was not doing it well, but when I jarred the one that uploads the files to the same database using the same method, it worked very fine as shown in (chuksproj1.jpg).

Please can anybody give me suggestion on how to overcome this challenge.

Thank you in anticipation.

Re: Please Could You Help Me With This Java Challenge by chukxy: 8:56am On Jul 27, 2010
Chee!! Ebulengwa atokwala n'obe!
Nairaland java gurus want to abandon one of their own!
Somebody hold me before I do this:


import java.justice.*;
import java.police.*;
import javax.swing.*;
import java.awt.*;

public class MyAction extends Court implements PoliceListener{


private boolean challenge_status;
private JButton takeAction;

public MyAction()
{

JPanel p1 = new JPanel(new GridLayout(0,1));
challenge_status = getChallengeStatus();
takeAction = new JButton("TakeAction"wink;


p1.add(challenge_status);
p1.add(takeAction);

add(p1,BorderLayout.CENTER);


takeAction.addPoliceListener(this);
}

private boolean getChallengeStatus()
{
boolean status ;

if(Problem solved)
{
status =true;
}

if(!(Problem solved))
{
status = false;
}
return status;

}



public void actionPerformed(ActionEvent ae)
{

Object o = ae.getSource();

if(challenge_status== true by the end of the day)
{
doMyFavouriteHobby("Dance"wink;
takeAllNairaLandGuruToBurgerKing("Thrill them with unprecedented fun"wink;
giveAllMoney("10 Pounds"wink;
System.out.println("I am very happy"wink;
}


else
{

if(challenge_status==false by the end of the day)

{
startCrying("All through the nite"wink;
System.out.println("I have been crying"wink;
}

if(challenge_status==false by the end of two days)
{
crashMyLaptop("Yes do it"wink;
commitMurder("Kill myself"wink;
arrestAllNairalandGuru();
jailForTenYrs("For manslaughter and indifference"wink;
System.exit(0);
}
}


public static void createGUI()
{

JFrame jf = new JFrame("My Action"wink
jf.add(new MyAction());
jf.pack();
jf.setVisible(true);
}


public static void main(String args[])
{
SwingUtilities.invokeLater(new Runnable(){ public void run(){ createGUI();}});
}
}
Re: Please Could You Help Me With This Java Challenge by chukxy: 10:17am On Jul 29, 2010
I have overcome the second challenge but the first one is still pending( i.e unable to retrieve all the image files and id from the database and displaying all of them in a table at once). I am beginning to think something is wrong with my post, as each time I seek for help on the challenge I am facing I rarely get reply. If there is anything wrong, I am ready to take correction.
Re: Please Could You Help Me With This Java Challenge by chukxy: 9:06am On Jul 30, 2010
I have overcome my challenge, Thank you for viewing! smiley
Re: Please Could You Help Me With This Java Challenge by Slyr0x: 11:16am On Jul 30, 2010
chukxy:

I have overcome my challenge, Thank you for viewing! smiley

lol,

(1) (Reply)

Upload File / Pixels Don’t Care - A Must Read For Programmers / How To Redirect A Website Based On Screen Resolution

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 15
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.