Applet Urgent Help Plz

Hello Everyone, im having a major problem with this applet.I am trying to create a Black Jack card game to play around.It is compiling with no errors however the applet doesnt seem to get initialised thus it is not possible to be viewed in the applet viewer. What im trying to achieve is being able to draw 2 cards in the deck. Ever since i tried to use the showBlackjackScore() method as well as the init()method things started to get serious.These methods implementations were taken from: http://nifty.stanford.edu/2004/EstellCardGame/code.html were the Card, Deck, Hand, Rank, and Suit classes are also implemented, and are used with this program. Would appreciate any help! Other than that, the Gui is of my own and is a really nice example for ideas in your future java programs.Thanks in Advance!
import javax.swing.*;     
import java.awt.*;     
import java.awt.event.*;
import javax.swing.border.*;
import java.util.*;
public class BlackJackClient extends JApplet
     private Deck cardDeck;
    private BlackjackHand myHand;
    private final int SIZE_OF_HAND = 2;
    private final String directory = "cards/";
        private JLabel[] handLbl = new JLabel[ SIZE_OF_HAND ];
     private Container container;
     private JPanel panel1,panel2,Flow,Opponent,Player;
     private JPanel cardsTop,cardsBottom;
     private JLabel Player_Status;
     private JLabel top_card1,top_card2,top_card3,top_card4,top_card5;
     private JLabel bottom_card1,bottom_card2,bottom_card3,bottom_card4,bottom_card5;
     private TitledBorder opponent,player;
     private TitledBorder Cr1,Cr2,Cr3,Cr4,Cr5;
     private TitledBorder B1,B2,B3,B4,B5;
     private JPanel box1,box2,box3,box4,box5,box6,box7,box8,box9,box10;
     private JTextArea Messages;
     private JButton Hit,Stand,JButton1;
     private JLabel scoreLbl;
    public BlackJackClient()//CONSTRUCTOR
         container=getContentPane();
         container.setLayout(new BoxLayout(container,BoxLayout.Y_AXIS));
         scoreLbl.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
          scoreLbl.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
          getContentPane().add(scoreLbl);
          scoreLbl.setForeground(java.awt.Color.black);
          scoreLbl.setFont(new Font("Dialog", Font.BOLD, 64));
          scoreLbl.setBounds(252,48,103,88); 
         //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++PANELS
         JPanel p = new JPanel();
          p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
          Opponent=new JPanel();
         Player=new JPanel();
         cardsTop=new JPanel(new FlowLayout(FlowLayout.CENTER,10,15));
         cardsBottom=new JPanel(new FlowLayout(FlowLayout.CENTER,10,15));
         panel1=new JPanel();          
         panel2=new JPanel();     
         box1=new JPanel();
         box2=new JPanel();
         box3=new JPanel();
         box4=new JPanel();
         box5=new JPanel();
         box6=new JPanel();
         box7=new JPanel();
         box8=new JPanel();
         box9=new JPanel();
         box10=new JPanel(); 
         Flow=new JPanel(new FlowLayout(FlowLayout.RIGHT,3,0));
          //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
          JLabel label=new JLabel("Welcome To BlackJack 21",SwingConstants.CENTER);
          label.setForeground(Color.white);
          label.setFont(new Font("Futura",Font.BOLD,19));
          panel1.add(label);
          panel1.setBackground(Color.black);
         Icon card1=new ImageIcon("Trapula/c1.png");
         top_card1=new JLabel(card1);
         Icon card2=new ImageIcon("Trapula/d1.png");
         top_card2=new JLabel(card2);
         Icon card3=new ImageIcon("Trapula/h1.png");
         top_card3=new JLabel(card3);
         Icon card4=new ImageIcon("Trapula/s1.png");
         top_card4=new JLabel(card4);
         Icon card5=new ImageIcon("Trapula/ck.png");
         top_card5=new JLabel(card5);
         box1.add(top_card1);
         cardsTop.add(box1);
         box2.add(top_card2);
         cardsTop.add(box2);
         box3.add(top_card3);
         cardsTop.add(box3);
         box4.add(top_card4);
         cardsTop.add(box4);
         box5.add(top_card5);
         cardsTop.add(box5);
            Cr1 = new TitledBorder(new LineBorder(Color.black,2), "");
             box1.setBorder(Cr1);
             box1.setBackground(Color.gray);
         Cr2 = new TitledBorder(new LineBorder(Color.black,2), "");
             box2.setBorder(Cr2);
             box2.setBackground(Color.gray);
             Cr3 = new TitledBorder(new LineBorder(Color.black,2), "");
             box3.setBorder(Cr3);
             box3.setBackground(Color.gray);
             Cr4 = new TitledBorder(new LineBorder(Color.black,2), "");
             box4.setBorder(Cr4);
             box4.setBackground(Color.gray);
             Cr5 = new TitledBorder(new LineBorder(Color.black,2), "");
             box5.setBorder(Cr5);
             box5.setBackground(Color.gray);
             opponent=new TitledBorder(new LineBorder(Color.black,5),"Opponent");
             Opponent.setBorder(opponent);
             Opponent.add(cardsTop);
             Opponent.setBackground(Color.green);
         cardsTop.setBackground(Color.green); 
         //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
             Icon card6=new ImageIcon("Trapula/s4.png");
            bottom_card1=new JLabel(card6);
             Icon card7=new ImageIcon("Trapula/s5.png");
             bottom_card2=new JLabel(card7);
             Icon card8=new ImageIcon("Trapula/s6.png");
             bottom_card3=new JLabel(card8);
             Icon card9=new ImageIcon("Trapula/s7.png");
             bottom_card4=new JLabel(card9);
             Icon card10=new ImageIcon("Trapula/s8.png");
             bottom_card5=new JLabel(card10);
             box6.add(bottom_card1);
         cardsBottom.add(box6);
         box7.add(bottom_card2);
         cardsBottom.add(box7);
         box8.add(bottom_card3);
         cardsBottom.add(box8);
         box9.add(bottom_card4);
         cardsBottom.add(box9);
         box10.add(bottom_card5);
         cardsBottom.add(box10);
             B1=new TitledBorder(new LineBorder(Color.black,2), "");
             box6.setBorder(B1);
             box6.setBackground(Color.gray);
             B2=new TitledBorder(new LineBorder(Color.black,2), "");
             box7.setBorder(B2);
             box7.setBackground(Color.gray);
             B3=new TitledBorder(new LineBorder(Color.black,2), "");
             box8.setBorder(B3);
             box8.setBackground(Color.gray);
             B4=new TitledBorder(new LineBorder(Color.black,2), "");
             box9.setBorder(B4);
             box9.setBackground(Color.gray);
             B5=new TitledBorder(new LineBorder(Color.black,2), "");
             box10.setBorder(B5);
             box10.setBackground(Color.gray);
             player=new TitledBorder(new LineBorder(Color.black,5),"Player");
             player.setTitleColor(Color.black);
             Player.setBorder(player);
             JPanel Hand=new JPanel();
         JButton1=new JButton("Draw Hand");
             JButton1.setActionCommand("Draw a Hand");
             JButton1.addActionListener(new ActionListener()
             {     public void actionPerformed(ActionEvent e)
                  {     Object object=e.getSource();
                            if(e.getSource()==object)
                            {     cardDeck.restoreDeck();
                              cardDeck.shuffle();
                              myHand.discardHand();
                                   for ( int i = 0; i < SIZE_OF_HAND; i++ )
                                   {   Card c = cardDeck.dealCard();
                                           myHand.addCard( c );
                                           handLbl.setIcon( c.getCardImage() );
                                        handLbl[i].setText( c.toString() );
                    showBlackjackScore();
     Hand.add(JButton1);
     Hand.setBackground(Color.green);
     cardsBottom.setBackground(Color.green);
     Player.setBackground(Color.green);
     Player.add(cardsBottom);
     //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     Messages=new JTextArea("----------------------------------------------------Messages-------------------------------------------------\n\n\n",10,42);
     JScrollPane scroller=new JScrollPane(Messages);
     Messages.setEditable(false);
     Messages.setForeground(Color.white);
     Messages.setBackground(Color.gray);
     panel2.setBackground(Color.green);
     panel2.add(scroller);
     //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     JButton Exit=new JButton("Exit");
     Exit.setToolTipText("Disconnect");
     Hit=new JButton("Hit");
     Hit.setToolTipText("Ask another card?");
     Stand=new JButton("Stand");
     Stand.setToolTipText("Satisfied with your card/s?");
     JLabel l1=new JLabel(" ");
     JLabel l2=new JLabel(" ");
     JLabel l3=new JLabel(" ");
     JLabel l4=new JLabel(" ");
     JLabel l5=new JLabel(" ");
     Exit.addActionListener(new ActionListener()
               {public void actionPerformed(ActionEvent e)
                    {System.out.println("Disconnected from BlackJack Thank you for Gambling!");
                     System.exit(0);
     Hit.addActionListener(new ActionListener()
               {public void actionPerformed(ActionEvent e)
                    {Messages.append("Hit Me!!\n");}
     Stand.addActionListener(new ActionListener()
               {public void actionPerformed(ActionEvent e)
                    {Messages.append("Stand\n");}
     Flow.add(l1);
     Flow.add(l2);
     Flow.add(l3);
     Flow.add(l4);
     Flow.add(l5);
     Flow.add(Exit);
     Flow.add(Hit);
     Flow.add(Stand);          
     Flow.setBackground(Color.green);
     p.add(Flow);
     //++++++++++++++++++++++++++++++++++++++++++++++++++++
     container.add(panel1);
     container.add(Opponent);
     container.add(Player);
     container.add(Hand);
     container.add(panel2);
     container.add(p);
}//end of Black Jack client constructor
     public void init()
     {     cardDeck = new Deck();
               Iterator suitIterator = Suit.VALUES.iterator();
                    while ( suitIterator.hasNext() )
                    {   Suit suit = (Suit) suitIterator.next();
                    Iterator rankIterator = Rank.VALUES.iterator();
                         while ( rankIterator.hasNext() )
                              {     Rank rank = (Rank) rankIterator.next();
                              String imageFile = directory + Card.getFilename( suit, rank );
                         ImageIcon cardImage = new ImageIcon( getImage( getCodeBase(), imageFile ) );
                         Card card = new Card( suit, rank, cardImage );
                         cardDeck.addCard( card );
     }//end of init      
private void showBlackjackScore()
     int score = myHand.evaluateHand();
          if( score == 21 )
          {     scoreLbl.setText( score + "!" );
          scoreLbl.setForeground( Color.red );
          else
          {     scoreLbl.setText( "" + score );
          scoreLbl.setForeground( Color.black );
          }//end of showBlackjackScore      
}//end of class Black Jack client

I might be wrong, but maybe the init() method isn't showing any GUI because you're not creating or adding any components there.
Rather than putting all the Swing code in your constructor, put it in a method that returns your top-level component, such as:
private Component createComponents() {
        // blah
}Then, in your init() method, try something like:
     public void init() {
          try {
               SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                         createComponents();
          catch (Exception e) {
               System.err.println("Applet could not be created succesfully");
               e.printStackTrace();
     }Do you get any error messages with your current program?
Message was edited by:
Djaunl

Similar Messages

  • LASERJET M1217 nfw MFP urgent help plz

    HAY GUYS, NEED URGENT HELP!!!!!!!!!
    My printer M1217 nfw MFP had a problem with the scanner and it was fixed bu updating the firmware and the scanner works fine and offcourse i printed the config. report  befor updating the firmware , the problem is that i lost the report and i cant config. the fax or the wirless connection . any help plz guys  

    kelsaeed wrote:
    HAY GUYS, NEED URGENT HELP!!!!!!!!!
    My printer M1217 nfw MFP had a problem with the scanner and it was fixed bu updating the firmware and the scanner works fine and offcourse i printed the config. report  befor updating the firmware , the problem is that i lost the report and i cant config. the fax or the wirless connection . any help plz guys  

  • Display Table contents using HTMLB...Urgent Help Plz...

    Hello All,
    Im working on EP SP14 and SQL Server 2000.
    I have successfully established database connection.
    I want to know <b>how can I display Table contents using TableViewModel in HTMLB</b>.
    Please help.
    Its urgent.
    Awaiting Reply.
    Thanks in advance,
    Uday<b></b>

    See /thread/80270 [original link is broken]
    (please stop crossposting every question into two forums; thanks in advance)

  • Urgent help plz plz plz plz..........

    i 4got the  security key guard  of  nokia3110..i cant use it now..plz help me 2 unlock.... i hope sum1 reply soon

    If you have forgotten the code and the default code (12345) doesn't work then your only option to get the security code reset is at a nokia care point.
    They will need to see some form of proof that you are the owner before they will do it.  They will charge a fee for this service and you may lose all of your data.
    Care points/service centres and repair info:
    UK • Europe • Asia-Pacific • USA •
    Canada • Middle East and Africa
    Elsewhere: Click here, select your country, go to the support section, then select repair.

  • HELP MENU FUNCTION-URGENT HELP PLZ.

    Hello there. I've been trying to design a GUI providing the users with help function as well. I create the html file, map file(in .jhm format) and HelpSet (in .hs format) and run the help menu via hsviewer. The first problem is that when the hsviewer runs the application a blank help window appears on the screen. The second one is that when I try to make a link between the help menu and the GUI I have written by using the sample code given in javahelp's pdf file I see a few error messages on NETBEANS' screen. Could anyone help me solve the problems I have faced so far? In addition, aint there any other method, like a template help menu, that I could use to compose my own one?

    * stop multi-posting
    * stop SHOUTING
    * whenever you see error messages and have some problem, those two are probably related
    * whenever you ask for help and have error messages post the error messages!

  • Server hangs up when tryin to read object Urgent Help Plz

    Hi,
    I've been working on a client-server model for a while, I've tested my applicaction a thousand of times locally (I mean, server and serveral clients running on the same machine) and it's ok, now I finally run server in a remote host and I find it rarely works fine, most of the times server hangs up when tryin to read objects I dont know why.
    this is the part of the server-code where the problem begins:
    public int EscucharSocket(){
            Socket cliente = null;
            System.out.println("Servidor en escucha...\n");
            while(true){
                try{
                    cliente = SocketS.accept();
                    //I get client's ip and port
                    String ip = cliente.getInetAddress().getHostAddress();
                    int puerto = cliente.getPort();
                    //After the conexion is made, server reads a signature to
                    //identify the client
                   //in function process I check if the signature is valid
                   //SignedData is a class where I wrap the signiture (obviously
                   //it implements Serializable interface
                   process((SignedData)le.LeerObject(cliente));
                   //Other things done here
                catch (Exception e) { }
    }le is a class I use to read,write data to the socket, this is the code of the LeerObject function
    public Object LeerObject(Socket c) throws Exception {
           //Here Is where the server hangs up
            ObjectInputStream b = new ObjectInputStream(c.getInputStream());
            return b.readObject();
    }As I wrote when running locally, there is no problem, but when I have a remote host, that happens
    Any help or idea?

    Hi again, thnx for your help
    I modified my LE class so I just create a couple of Input/Output Streams per client (on server n client program), this is now the complete code of the class:
    import java.net.*;
    import java.io.*;
    public class LE {
        DataOutputStream     dos;
        ObjectOutputStream  oos;
        DataInputStream        dis;
        ObjectInputStream     ois;
        //Streams are created just once in the constructor
        public LE (Socket s) throws Exception {
            dos = new DataOutputStream(s.getOutputStream());
             //I'm not sure if this flush has any sense
            dos.flush();
            oos = new ObjectOutputStream (s.getOutputStream());
            oos.flush();
            dis = new DataInputStream(s.getInputStream());
            ois = new ObjectInputStream (s.getInputStream());
        public void EscribirByte(byte datos[],int len) throws Exception {
            dos.write(datos,0,len);
            dos.flush();
        public void EscribirString(String dato) throws Exception {
            dos.writeUTF(dato);
            dos.flush();
        public void EscribirChar(char dato) throws Exception {
            dos.writeChar(dato);
            dos.flush();       
        public void EscribirInt(int dato) throws Exception {
            dos.writeInt(dato);
            dos.flush();
        public void EscribirLong(long dato) throws Exception {
            dos.writeLong(dato);
            dos.flush();
        public void EscribirObject(Object dato) throws Exception {
            oos.writeObject(dato);
            oos.flush();
        public String LeerString() throws Exception {       
            return dis.readUTF();
        public int LeerInt() throws Exception {       
            return dis.readInt();
        public char LeerChar() throws Exception {       
            return dis.readChar();
        public long LeerLong() throws Exception {       
            return dis.readLong();
        public Object LeerObject() throws Exception {       
            return ois.readObject();
    }part of code of server and client, where the conexion is made and the LE object is created
    Server:
    try{
           cliente = SocketS.accept();               
           //After accepting the conexion the LE object is created
            le = new LE(cliente);
            //I get client's ip and port
            String ip = cliente.getInetAddress().getHostAddress();
            int puerto = cliente.getPort();
            //Object wraping signature is read        
            process((SignedData)le.LeerObject());
            //other control operations doing here
            //A thread is created to receive requests from client
            //(reference to LE object is passed to the thread
           ConexionCliente c = new ConexionCliente (cliente,id_persona,id_grupo,tipo_usuario,backup,le);                               
            //thread is started
            c.start();
    catch (Exception e) {
        try {
            cliente.close();
        catch(Exception e2){}
    }Cliente code:
    try{
       //it connects to the server
       c=new Socket(host,puerto);
       //After accepting the conexion the LE object is created         
       le = new LE(c);
       //other things made here to genarate SignedData Object
      //It sends signed data object
      le.EscribirObject(Data);          
      //A thread is created and started to receive messages from server
      //reference to object LE is sent to the thread to avoid the need of
      //creating another
      new ConexionServidorClient(c,id_persona,ci,le).start();
      return 1;
    catch(Exception e) {
       return -1;
    }after the change, itworks a little better, but still most of the times server hangs up, I can't make server operational yet and I dont have any idea for solving this issue

  • Urgent Help Plz... Help Me..from Muhammad

    Haiy guys can any i tell me that whcih Video format is better QCIF Video or VGA Video plz.. reply I m waiting.
    From Muhammad.
    Muhammad

    QCIF is 176×144
    VGA is 640×480
    So VGA is better.
    QCIF means "Quarter CIF". CIF means "Common Intermediate Format" (352×288)
    The best phones to do VGA videos with is the 6233 or even better, the N93

  • Grid view  border urgent help plz guys

    i am trying to have 5 rows and 6 colums in a grid view
    but the problem is i cannot set any border for the gird view.
    please tell me how to set a border for a GRID layout in javafx
    even in jfxtras i couldn't manage to set any border for a grid.
    there is a border property but i can't it' not working. please help me out on this issue.

    What I would do is to create a class that represents a day in the calendar (rectangle + day + task), and use a layout to arrange them (all the days) on a table shape.
    May this example help you to start (I'm using Tile layout instead of Grid layout):
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.paint.Color;
    import javafx.scene.CustomNode;
    import javafx.scene.Node;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.layout.Tile;
    import javafx.scene.layout.Stack;
    import javafx.scene.control.Label;
    import javafx.scene.layout.LayoutInfo;
    import javafx.geometry.HPos;
    import javafx.scene.layout.VBox;
    import javafx.scene.text.Font;
    import javafx.scene.paint.LinearGradient;
    import javafx.scene.paint.Stop;
    class Day extends CustomNode{
        public-init var number: Integer;
        public-init var task: String;
        public override function create(): Node{
            Stack{
                content:[
                    Rectangle {
                        width: 75, height: 50
                        fill: LinearGradient {
                            startX: 0.0
                            startY: 0.0
                            endX: 0.0
                            endY: 1.0
                            stops: [
                                Stop {
                                    color: Color.WHITESMOKE
                                    offset: 0.0
                                Stop {
                                    color: Color.SILVER
                                    offset: 1.0
                        stroke: Color.BLACK
                    VBox{
                        content:[
                            Label {
                                text: number.toString()
                                textFill: Color.rgb(100,0,0)
                                font: Font{ size: 16 }
                            Label{
                                text: task
                                font: Font{ size: 10 }
                        spacing: 8
                        nodeHPos: HPos.CENTER
                        layoutInfo: LayoutInfo{ hfill: false, vfill: false }
    Stage {
        title: "MyCalendar"
        scene: Scene {
            width: 600
            height: 500
            content: [
              Tile {
                columns: 7
                content: [
                    Day{number: 1, task: ""},
                    Day{number: 2, task: ""},
                    Day{number: 3, task: "Anne's Birthday"},
                    Day{number: 4, task: ""},
                    Day{number: 5, task: ""},
                    Day{number: 6, task: ""},
                    Day{number: 7, task: "Buy a new TV"},
                    Day{number: 8, task: ""},
                    Day{number: 9, task: ""},
                    Day{number: 10, task: ""},
                    Day{number: 11, task: ""},
                    Day{number: 12, task: "Go theater"},
                    Day{number: 13, task: ""},
                    Day{number: 14, task: ""},
                    Day{number: 15, task: ""},
                    Day{number: 16, task: ""},
                    Day{number: 17, task: "Pay bills"},
                    Day{number: 18, task: ""},
                    Day{number: 19, task: "Pay more bills :("},
                    Day{number: 20, task: ""},
                    Day{number: 21, task: ""},
                    Day{number: 22, task: ""},
                    Day{number: 23, task: ""},
                    Day{number: 24, task: ""},
                    Day{number: 25, task: ""},
                    Day{number: 26, task: ""},
                    Day{number: 27, task: "Suzy's OrgyParty"},
                    Day{number: 28, task: ""},
                    Day{number: 29, task: ""},
                    Day{number: 30, task: ""},
                    Day{number: 31, task: ""},
                layoutX: 40, layoutY: 20
                layoutInfo: LayoutInfo{ hfill: false, vfill: false }
    }

  • Want urgent help plz help me?

    Hi!
    it's not realy a pure jsp related question but i feel the helpfull peaople on this forum will definatly help me.
    Actually in my jsp page i am first inserting a manue (drop down ) bar below in the page there may be many text fields and combo boxes ... when i drop the manue bar by moving my mouse on it.... it overlaps well the text fields but if there comes a combo box in it's way the manue bar just cann't overlap it i.e text fields are hidden behind the menue baar but the combo boxes don't due to which my menue baar seems like it has been cut off (when a combo box apperars in it's way).
    can anyone of u give me any idea how to get rid of this problem?
    thanx in advance
    sajjad ahmed paracha

    Hi
    thanks for ur reply!
    yeah i am creating that menue baar with java script and combo boxes are pure HTML select fields .....now back to ur solution how do i know that which combo boxes will come in the manue's way so that i can hide them through java script (hiding combo boxes is very easy but how do i know that which combo boxes i have to hide in my page) i just cann't track those combo boxes especialy when i have more then one manues overlaping more then one combos.....
    i tried to use layers too but it didn't work ...still i am facing the same problem.....
    have you anyother good idea????
    thanx once agia for ur reply......
    best wishes
    sajjad ahmed paracha

  • Urgent Help Plz..

    Hey all,
    The requirments for installing the ESS buissness package
    the new one which uses Java Webdynpro technology for IViews is having the ERP 2004 as the backend system
    Web application Server 6.4 and EP 6.0 Netweaver 04
    I have all of the requirments but the backend system is IDES 4.7, i have ordered the ERP 2004 but it will take 3 days to arrive and i have a demo tommorow
    My question is cant i download any plugins or patches
    while The ERP 2004 arrives ?
    or upgrades to use the ESS package for the Java stack on the 4.7 version

    I'm afraid the simple answer is no.
    You have to do a full upgrade from 4.7 to ERP 2004.
    Paul

  • URGENT HELP plz! crop image

    I have an image
    when loaded into my program, i have the getScaledInstance to about half of the size
    and then i want to crop on that scaled image icon, how can i do that?
    i tried the crop image filter, but it always need to getImage().getSource() which require the cooridnates of the original image (non scaled one)
    i do not have the cooridnate of the original image, i just have the scaled image coordinate part for cropping. How can i crop?

    Hey, here's some code:
              URL url = getClass().getClassLoader().getResource("some_image.jpg");
              Image rawImage = ImageIO.read(url);
              Image bufferedImage = new BufferedImage(X, X, BufferedImage.TYPE_INT_ARGB);
              // Perform your scaling here.
              bufferedImage.getGraphics().drawImage(rawImage, 0, 0, X, X, X);
              MediaTracker tracker = new MediaTracker(this);
              tracker.addImage(bufferedImage, 1);
              tracker.waitForID(1);
              Image cropImage = bufferedImage.getSubimage(X, X, X, X);Is this anymore useful to you?
    Warm regards.

  • PC2PC urgent help plz :|

    hi!
    i have this PC2PC tranceiver module and Diapole Antenna that i never used, and iam planning to!
    i connected the tranceiver "red light on" and diapole antenna then installed the Bluetooth.exe software that is found into MSI communications -> bluetooth site, but its not workin!
    is there any instructions how to get it workin?
    please tell me how to do it!
    ( there is a note not to remove / use the 2nd USB 2 port since its gonna be used by the bluetooth, i never used it, its still covered infact!)
    my Motherboard is 845E MAX2

    If you have forgotten the code and the default code (12345) doesn't work then your only option to get the security code reset is at a nokia care point.
    They will need to see some form of proof that you are the owner before they will do it.  They will charge a fee for this service and you may lose all of your data.
    Care points/service centres and repair info:
    UK • Europe • Asia-Pacific • USA •
    Canada • Middle East and Africa
    Elsewhere: Click here, select your country, go to the support section, then select repair.

  • Need Urgent Help plz

    Actually i have problem that i dont know how to parse an xml file.
    Is there any class method in which the xml file name is passed as an argument. then if i want to modify any node's attribute value in the xml then i can be done.
    i have stdudied JDOM and DOMParser.
    but in these both packages. but i have not seen any where the name of the xml file is passing as an argument. may be i m wrong. if u have any idea. then it will be greatly appriciated.
    Nomi.

    This search:
    http://www.google.co.za/search?hl=en&q=how+to+use+JDOM&meta=
    Finds this site:
    http://www.javaworld.com/javaworld/jw-07-2000/jw-0728-jdom2.html
    That leads to:
    http://www.javaworld.com/javaworld/jw-05-2000/jw-0518-jdom-p2.html
    OP, please STFW!

  • Help Plz.......!!!!its urgent

    hi nokia users
    flash lite on my 5530 only plays youtube videos,and when tried to play videos on other sites then it says flash player is required............do ui use any software that supports web videos...???
    help plz.....
    thanks in advance

    Falshplayer vedio cant acces in your device?

  • ClassNotFoundException in applet-urgent

    Hai
    I am having an applet "tstapplet" whose class file is stored in a jar file and the applet is inside a package named test.
    I wrote the following applet tag
    <applet code="tstapplet.class" archive="../deploy/showj.jar">
    </applet>
    I am getting ClassNotFoundException ; tstapplet.class
    What should I do Is the applet code wrong
    Plz help urgent
    tintuthilak

    <applet code="test.tstapplet" archive="../deploy/showj.jar">
    </applet>
    Try to open it with Firefox or Mozilla (you can be sure MSJVM does not try to open
    the applet).
    When it works convert the html page with [jdk.home]\bin\htmlconverter.exe

Maybe you are looking for

  • Javac missing (?) from SDK install

    Any help appreciated: I installed the 5.0SE SDK. When attempting to compile a source code file, I received the message: 'javac' is not recognized as an internal or external command, operable program or batch file. After some research, I properly set

  • Selection of active plot

    Hello I am programming, an program, with an graf i Labview 6i. Is there some build in way to let the user choose the active plot in an graf? I find it a litle difficult to do the programming myself, just to create the radiobuttons(array of booleans,

  • HP2545 Prints blank or grey pages after cleaning, and changing the ink

    Hello. I just now happen to have a problem with my printer.  I was doing some important scanning of files and all of a sudden the printer stopped printing (I got only blank pages). So I thought that the ink was used, so I changed it. Still nothing. S

  • Deployment: Deploying external libraries from dependent projects

    Hi, i need some help for the following issue. How do I deploy external libraries from dependent projects? I have one project for the model layer which references TopLink JPA library and an other project for view/controller based on JSF/ADF Faces. The

  • How to check for the prerequisite Support pack level

    We are planning to upgrade from 4.7 to ECC6..How can check ,what is minimum support pack level that needs to be maintained in 4.7 for the upgrdade to ECC6. Can i check this in Servrice markrt place .if so please let me know where to check Thanks