₦airaland Forum

Welcome, Guest: Join Nairaland / LOGIN! / Trending / Recent / New
Stats: 2,007,355 members, 4,254,628 topics. Date: Tuesday, 22 May 2018 at 08:45 PM

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 (668 Views)

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

(0) (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,

(0) (Reply)

Php Help! / SMS Shortcode Issues / Recommend A Compiler For C

(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: (0) (1) (2) (3) (4) (5) (6) (7) (8) (9)

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