Java rotate, drag RoundRectangle2D problem please help me!!!

Hi,
i have 2 program, the first program can rotate a RoundRectangle2D, and the secend program can create new RoundRectangle2D and drag them around.
The problem is that i want the rotate and the drag functions in one file, could any wone plese help me with this??
The code has been orginally written by phillips75. i have modified it.
The first program that rotates a Rectangle2D
package appli;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.util.*;
import java.util.List;
import javax.swing.*;
import javax.swing.event.MouseInputAdapter;
public class minappli extends JApplet
Vector shape = new Vector();
class axel extends JPanel
axel selectedRect;
//RoundRectangle2D r;
RectangularShape r;
RectangularShape rsss;
AffineTransform xform;
int theta;
public axel()
shape.addElement(new axel(40, 50, 50, 60));
shape.addElement(new axel(150, 100, 50, 60));
shape.addElement(new axel(40, 150, 50, 60));
setBackground(Color.white);
addMouseListener(new RectSelector(this));
public axel (int x, int y, int w, int h)
r = new RoundRectangle2D.Double(x, y, w, h, 20, 20);
xform = new AffineTransform();
theta = 0;
public void drawdd (Graphics2D g2)
AffineTransform orig = g2.getTransform();
if (!xform.isIdentity())
g2.setTransform(xform);
g2.draw(r);
g2.setTransform(orig);
public void rotateRect()
double cx = r.getCenterX();
double cy = r.getCenterY();
theta = theta + 5;
xform.setToRotation(Math.toRadians(theta), cx, cy);
public void paintComponent(Graphics g)
super.paintComponent(g);
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
//int w = getWidth();
//int h = getHeight();
axel rs;
for(int i = 0; i < shape.size(); i++)
rs = (axel) shape.get(i);
// System.out.println(" rs " + rs + " rsss " + konam);
if (rs == selectedRect)
g2.setPaint(Color.yellow);
else
g2.setPaint(Color.black);
rs.drawdd(g2);
class RectSelector extends MouseInputAdapter
axel rotationPanel;
RectangularShape selectedShape;
axel rs;
Point start, offset;
boolean addCircle, addSquare, dragging;
final int size = 50;
public RectSelector(axel fp)
rotationPanel = fp;
offset = new Point();
addCircle = false;
addSquare = false;
dragging = false;
public void mousePressed(MouseEvent e)
RectangularShape rssss = null;
Point p = e.getPoint();
rssss = new RoundRectangle2D.Double(p.x - size / 2, p.y - size / 2, size, size, 20, 20);
for (int i = 0; i < shape.size(); i++)
rs = (axel) shape.get(i);
//System.out.println("rs" + rs);
if (rs.r.contains(p))
selectedRect = rs;
repaint();
break;
public void mouseReleased(MouseEvent e)
selectedShape = null;
dragging = false;
public void mouseDragged(MouseEvent e)
if (dragging)
Point p = e.getPoint();
if (selectedShape != null)
// dragging a shape
Rectangle r = selectedShape.getBounds();
r.x = p.x - offset.x;
r.y = p.y - offset.y;
selectedShape.setFrame(r);
rotationPanel.repaint();
public JPanel getUIpanelg()
final JButton rotateButton = new JButton("Rotate");
final JButton box = new JButton("Box");
rotateButton.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
if (e.getSource() == rotateButton)
selectedRect.rotateRect();
repaint();
JPanel panel = new JPanel();
panel.add(rotateButton);
panel.add(box);
return panel;
public void init()
axel rp = new axel();
Container cp = getContentPane();
cp.setLayout(new BorderLayout());
cp.add(rp.getUIpanelg(), "South");
cp.add(rp);
public static void main(String[] args)
JApplet applet = new minappli();
JFrame f = new JFrame("Test");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(applet);
f.setSize(400,300);
f.setLocation(200,200);
applet.init();
f.setVisible(true);
The second program that creates new Rectangle2D and drags it around
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.util.*;
import java.util.List;
import javax.swing.*;
import javax.swing.event.*;
public class axel extends JApplet
Vector shape = new Vector();
int theta;
RoundRectangle2D r;
AffineTransform xform;
class axel1 extends JPanel
axel1 selectedRect;
RectSelector action;
public axel1()
//shape.addElement(new axel1(40, 50, 50, 60));
//shapeList.addElement(new FlowPanel(150, 100, 50, 60));
//shapeList.addElement(new FlowPanel(40, 150, 50, 60));
setBackground(Color.white);
action = new RectSelector(this);
addMouseListener(action);
addMouseMotionListener(action);
public void drawdd (Graphics2D g2)
AffineTransform orig = g2.getTransform();
if (!xform.isIdentity())
g2.setTransform(xform);
g2.draw(r);
g2.setTransform(orig);
public axel1 (int x, int y, int w, int h)
r = new RoundRectangle2D.Double(x, y, w, h, 20, 20);
xform = new AffineTransform();
theta = 0;
public void rotateRect()
double cx = r.getCenterX();
double cy = r.getCenterY();
System.out.println("fffffffffffff");
theta = theta + 5;
xform.setToRotation(Math.toRadians(theta), cx, cy);
public void paintComponent(Graphics g)
super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
RoundRectangle2D rs;
for (int i = 0; i < shape.size(); i++)
//rs = (RectangularShape) shape.get(i);
g2.draw((RectangularShape) shape.get(i));
//rs = (axel1) shape.get(i);
//System.out.println("skapar " + i + "hahaaha " + rs);
//if (rs == selectedRect)
// g2.setPaint(Color.red);
//else
// g2.setPaint(Color.black);
public void clear()
shape.clear();
repaint();
class RectSelector extends MouseInputAdapter
axel1 rotationPanel;
RectangularShape selectedShape;
final int size = 50;
Point start, offset;
boolean addCircle, addSquare, dragging;
axel1 rs;
public RectSelector(axel1 fp)
// lista = (Vector) flowPanel.getShapeList();
shape.addElement(new RoundRectangle2D.Double(40, 50, 50, 60, 20, 20));
rotationPanel = fp;
offset = new Point();
addCircle = false;
addSquare = false;
dragging = false;
public void mousePressed(MouseEvent e)
RectangularShape rssss = null;
Point p = e.getPoint();
if (addCircle)
rssss = new Ellipse2D.Double(p.x - size / 2, p.y - size / 2, size, size);
if (addSquare)
rssss = new RoundRectangle2D.Double(p.x - size / 2, p.y - size / 2, size, size, 20, 20);
if (rssss != null)
shape.addElement(rssss);
rotationPanel.repaint();
addCircle = addSquare = false;
return;
// or are we selecting an existing shape to drag
for (int i = 0; i < shape.size(); i++)
rssss = (RectangularShape) shape.get(i);
if (rssss.contains(p))
System.out.println("nu " + i + " " + rssss);
selectedShape = rssss;
Rectangle r = rssss.getBounds();
offset.x = p.x - r.x;
offset.y = p.y - r.y;
dragging = true;
break;
public void mouseReleased(MouseEvent e)
selectedShape = null;
dragging = false;
public void mouseDragged(MouseEvent e)
if (dragging)
Point p = e.getPoint();
if (selectedShape != null)
// dragging a shape
Rectangle r = selectedShape.getBounds();
r.x = p.x - offset.x;
r.y = p.y - offset.y;
selectedShape.setFrame(r);
rotationPanel.repaint();
public JToolBar getToolBar()
JToolBar toolBar = new JToolBar();
ActionListener l = new ActionListener()
public void actionPerformed(ActionEvent e)
JButton button = (JButton) e.getSource();
String ac = button.getActionCommand();
if (ac.equals("Single arrow"))
addCircle = true;
if (ac.equals("Box"))
addSquare = true;
if (ac.equals("Clear"))
rotationPanel.clear();
if (ac.equals("Rotate"))
//double cx = r.getCenterX();
//double cy = r.getCenterY();
System.out.println("fffffffffffff");
//theta = theta + 5;
//xform.setToRotation(Math.toRadians(theta), cx, cy);
// repaint();
JButton button = makeButton("Single arrow", "Add a arrow", l);
toolBar.add(button);
button = makeButton("Box", "Add a box", l);
toolBar.add(button);
button = makeButton("Clear", "Clears everything", l);
toolBar.add(button);
button = makeButton("Rotate", "Rotate a shape", l);
toolBar.add(button);
return toolBar;
private JButton makeButton(String actionCommand, String toolTipText, ActionListener l)
JButton button = new JButton(actionCommand);
button.setActionCommand(actionCommand);
button.setToolTipText(toolTipText);
button.addActionListener(l);
return button;
public void init()
axel1 flowPanel = new axel1();
RectSelector action = flowPanel.action;
Container cp = getContentPane();
cp.setLayout(new BorderLayout());
cp.add(action.getToolBar(), "South");
cp.add(flowPanel);
public static void main(String[] args)
JApplet applet = new axel();
JFrame f = new JFrame("test");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(applet);
f.setSize(500, 400);
f.setLocation(200, 200);
applet.init();
f.setVisible(true);
The

New code:
Class Arrow
import java.awt.*;
import java.awt.geom.*;
import java.awt.event.*;
import javax.swing.*;
public class GraphicArrow  extends JComponent
    GeneralPath arrow   =  new GeneralPath();
    Stroke dashStroke   =  new BasicStroke(1, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 10f, new float[] {4f, 4f}, 0f);
    Paint gradientPaint =  new GradientPaint(-30, 0, Color.red, 10, 0, Color.yellow);
    GraphicArrow selectedArrow;
    public void paintComponent(Graphics _g)
        super.paintComponent(_g);
        Graphics2D g2 = (Graphics2D) _g;
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                           RenderingHints.VALUE_ANTIALIAS_ON);
        AffineTransform graphicsDefaultTransform = g2.getTransform();
        AffineTransform xform = new AffineTransform();
        Rectangle bounds = arrow.getBounds();
        Point startPoint = new Point();
        xform.translate(startPoint.x - bounds.x, startPoint.y - bounds.y);
        //g2.transform(xform);
        //g2.setStroke(dashStroke);
        //g2.draw(arrow);
         //g2.setTransform(graphicsDefaultTransform);
        //g2.transform(xform);
        //g2.setPaint(gradientPaint);
        //g2.fill(arrow);
        xform.translate(bounds.width + 20, 0);
        xform.translate(bounds.width + 20, 0);
        //g2.setTransform(graphicsDefaultTransform);
        g2.setPaint(gradientPaint);
        g2.transform(xform);
        g2.rotate(Math.PI / 1);
        g2.fill(arrow);
    public GraphicArrow (int x, int y)
        //Value before -20, -10
        arrow.moveTo(x, y);
        arrow.lineTo(0, -10);
        arrow.lineTo(0, -20);
        arrow.lineTo(20, 0);
        arrow.lineTo(0, 20);
        arrow.lineTo(0, 10);
        arrow.lineTo(-20, 10);
        arrow.lineTo(-20, -10);
        addMouseListener(new MouseAdapter()
            Rectangle hitRect = new Rectangle(0, 0, 5, 5);
            public void mouseClicked(MouseEvent e)
                Graphics2D g = (Graphics2D) getGraphics();
                AffineTransform xform = new AffineTransform();
                hitRect.x = e.getX();
                hitRect.y = e.getY();
                Rectangle bounds = arrow.getBounds();
                Point startPoint = new Point();
                //System.out.println("hh " + (bounds.x  ) );
                xform.setToTranslation(startPoint.x - bounds.x + 2 * bounds.width + 2 * 20, startPoint.y - bounds.y);
                xform.rotate(Math.PI / 1);
                g.setTransform(xform);
                if (g.hit(hitRect, arrow, false))
                    System.out.println("Traff " + xform);
    public static void main(String args[])
        Frame frame = new Frame("Arrow");
        frame.add(new GraphicArrow(0, 0));
        frame.setBackground(Color.white);
        frame.setSize(new Dimension(400, 350));
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
}The shape class:
import java.awt.event.*;
import java.awt.geom.*;
import java.util.*;
import java.util.List;
import javax.swing.*;
import javax.swing.event.MouseInputAdapter;
import java.awt.*;
public class Box extends JApplet
    Vector shape      = new Vector();
    Vector arrowArray = new Vector();
    int theta;
    class axel extends JPanel implements KeyListener
        GeneralPath arrow   = new GeneralPath();
        Stroke dashStroke   = new BasicStroke(1, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 10f, new float[] {10f, 10f}, 5f);
        Paint gradientPaint = new GradientPaint( -30, 0, Color.red, 10, 0, Color.yellow);
        boolean delete_box, addSquare, addArrow, dragging;
        axel selectedRect;
        RectangularShape boxen;
        AffineTransform xform;
        RectSelector action;
        String texten;
        public axel()
            shape.addElement(new axel("Text1", 40, 50, 50, 60));
            shape.addElement(new axel("Text2", 150, 100, 50, 60));
            shape.addElement(new axel("Text3", 40, 150, 50, 60));
            setBackground(Color.white);
            action = new RectSelector(this);
            addMouseListener(action);
            addMouseMotionListener(action);
            addKeyListener(this);
        public axel(String text, int x, int y, int w, int h)
            texten = text;
            boxen  = new RoundRectangle2D.Double(x, y, w, h, 20, 20);
            xform  = new AffineTransform();
            theta  = 5;
        public void rita(Graphics2D g2)
            double cx = boxen.getCenterX();
            double cy = boxen.getCenterY();
            int mus_x =(int) cx;
            int mus_y =(int) cy;
            AffineTransform orig = g2.getTransform();
            if (!xform.isIdentity())
                g2.setTransform(xform);
            g2.fill(boxen);
            g2.setColor(Color.black);
            g2.setFont(new Font("Helvetica", Font.BOLD, 12));
            g2.drawString(texten, mus_x + -11, mus_y + 5);
            g2.draw(boxen);
            g2.setTransform(orig);
        public void paintComponent(Graphics g)
           super.paintComponent(g);
           Graphics2D g2 = (Graphics2D) g;
           Image bild = getImage(getDocumentBase(), "images.jpg");
           g2.drawImage(bild, 0, 0, this);
           g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                               RenderingHints.VALUE_ANTIALIAS_ON);
           //Draw the Shapes
           for (int i = 0; i < shape.size(); i++)
               axel rsh = (axel) shape.get(i);
               if (rsh == selectedRect)
                   g2.setStroke(dashStroke);
                   g2.setPaint(Color.green);
               else
                   g2.setStroke(new BasicStroke(0));
                   g2.setPaint(Color.yellow);
               rsh.rita(g2);
           //Draw the Arrows
           for (int i = 0; i < arrowArray.size(); i++)
               GraphicArrow selectedArrow;
               GraphicArrow arrowen = (GraphicArrow) arrowArray.get(i);
               arrowen.paintComponent(g);
        public void resizen()
            Rectangle r      = boxen.getBounds();
            double    width  = boxen.getWidth()+2;
            double    height = boxen.getHeight()+2;
            boxen.setFrame(r.x, r.y, width, height);
        public void rotateRect()
            double cx = boxen.getCenterX();
            double cy = boxen.getCenterY();
            theta = theta - 5;
            xform.setToRotation(Math.toRadians(theta), cx, cy);
        public void rotateRect_right()
            double cx = boxen.getCenterX();
            double cy = boxen.getCenterY();
            theta = theta + 5;
            xform.setToRotation(Math.toRadians(theta), cx, cy);
        public void keyPressed(KeyEvent e) {
            System.out.println("Test1");
            if (e.isShiftDown()) {
                System.out.println("Test3");
            if (e.getKeyCode() == KeyEvent.VK_DELETE) {
                System.out.println("Test2");
        public void keyReleased(KeyEvent e) {
        public void keyTyped(KeyEvent e) {
        class RectSelector extends MouseInputAdapter {
            axel rotationPanel;
            RectangularShape selectedShape;
            axel rs;
            Point offset;
            final int size = 50;
            public RectSelector(axel fp)
                rotationPanel  = fp;
                offset         = new Point();
                delete_box     = false;
                addSquare      = false;
                addArrow       = false;
                dragging       = false;
            public void mousePressed(MouseEvent e) {
                Point p = e.getPoint();
                //New Box skapas
                if (addSquare)
                  shape.addElement(new axel("text5", p.x, p.y, 50, 60));
                  rotationPanel.repaint();
                  addSquare = false;
                  return;
                //New Arrow skapas
                if (addArrow)
                  arrowArray.addElement(new GraphicArrow(p.x, p.y));
                  rotationPanel.repaint();
                  addArrow = false;
                  return;
                for (int i = 0; i < shape.size(); i++)
                    rs = (axel) shape.get(i);
                    if (rs.boxen.contains(p))
                        if (delete_box) {
                            shape.removeElementAt(i);
                            delete_box = false;
                            repaint();
                        Rectangle r = rs.boxen.getBounds();
                        offset.x = p.x - r.x;
                        offset.y = p.y - r.y;
                        selectedRect = rs;
                        selectedShape = rs.boxen;
                        dragging = true;
                        repaint();
                    //else
                    //    System.out.println("press does not work " + delete_box + i + rs.boxen.contains(p));
            public void mouseReleased(MouseEvent e)
                int x = e.getX();
                int y = e.getY();
                selectedShape = null;
                dragging = false;
                setCursor(new Cursor(Cursor.DEFAULT_CURSOR) );
                //Graphics2D g3  = (Graphics2D) getGraphics();
                //g3.setStroke(new BasicStroke(0));
                //g3.setPaint(Color.yellow);
            public void mouseDragged(MouseEvent e)
                if (dragging) {
                    Point p = e.getPoint();
                    if (selectedShape != null) {
                        setCursor(new Cursor(Cursor.MOVE_CURSOR) );
                        Rectangle r = selectedShape.getBounds();
                        System.out.println("dragging " + p + p.x + " " + p.y);
                        r.x = p.x - offset.x;
                        r.y = p.y - offset.y;
                        selectedShape.setFrame(r);
                        repaint();
            public void mouseMoved(MouseEvent e)
        public JPanel panelen()
            final JButton rotate_left  = new JButton("Rotate left");
            final JButton rotate_right = new JButton("Rotate right");
            final JButton arrow        = new JButton("New Arrow");
            final JButton box          = new JButton("New Box");
            final JButton delete       = new JButton("Delete");
            final JButton resize       = new JButton("Resize");
            rotate_left.setCursor(new Cursor(Cursor.HAND_CURSOR) );
            rotate_right.setCursor(new Cursor(Cursor.HAND_CURSOR) );
            arrow.setCursor(new Cursor(Cursor.HAND_CURSOR) );
            box.setCursor(new Cursor(Cursor.HAND_CURSOR) );
            delete.setCursor(new Cursor(Cursor.HAND_CURSOR) );
            resize.setCursor(new Cursor(Cursor.HAND_CURSOR) );
            rotate_left.addActionListener(new ActionListener()
               public void actionPerformed(ActionEvent e)
                  if (e.getSource() == rotate_left && selectedRect != null)
                     selectedRect.rotateRect();
                     repaint();
            rotate_right.addActionListener(new ActionListener() {
               public void actionPerformed(ActionEvent e)
                  if (e.getSource() == rotate_right && selectedRect != null)
                     selectedRect.rotateRect_right();
                     repaint();
            arrow.addActionListener(new ActionListener()
               public void actionPerformed(ActionEvent e)
                  addArrow = (e.getSource() == arrow);
            box.addActionListener(new ActionListener()
               public void actionPerformed(ActionEvent e)
                  addSquare = (e.getSource() == box && selectedRect != null);
            delete.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                   delete_box = (e.getSource() == delete);
            resize.addActionListener(new ActionListener()
               public void actionPerformed(ActionEvent e)
                  if (e.getSource() == resize && selectedRect != null)
                     selectedRect.resizen();
                     repaint();
            JPanel panel = new JPanel();
            panel.setBackground( Color.orange );
            panel.add(rotate_left);
            panel.add(rotate_right);
            panel.add(arrow);
            panel.add(box);
            panel.add(delete);
            panel.add(resize);
            return panel;
    public void init() {
        axel rp = new axel();
        Container cp = getContentPane();
        cp.setLayout(new BorderLayout());
        cp.add(rp.panelen(), "South");
        cp.add(rp);
    public static void main(String[] args)
        JApplet applet = new Box();
        JFrame f = new JFrame("Test");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.getContentPane().add(applet);
        f.setSize(600, 400);
        f.setLocationRelativeTo(null);
        applet.init();
        f.setVisible(true);

Similar Messages

  • 7 Hours left :(! I hate Java Forte SO MUCH. Please help! Not much time

    7 Hours left :(! I hate Java Forte SO MUCH. Please help! Not much time
    Ok I first Installed Java Forte cause I had to a Course and the teacher gave us an Exe which was 62 MB on a Disc and i ran it and put Java Forte On My Computer. I also put a JDK program on my computer through a Java book(Got a CD with it).I could do my Java at home but there was a massive problem. I am using Windows XP and if i used java, My Computer would never shut down cause java would always be running. So this got frustrating and i decided to uninstall it.(Also the Java Plug in decided to stop my java Yahoo chat on IE).When i uninstalled it, I am not sure if i deleted the folder, Did it through control panel(Add/Remove), Or use the uninstaller, I didnt think there was an uninstaller.
    Anyway there was still some jc.java and java Web Start folders and J2SDK folder on my HDD.
    A while later I get a big Java Assignment to do, I decide to install the Java again on my Computer, I go ahead and click the exe, It takes me to an intall place, I wait, Wait impatiently for 1 hour, It just froze on the install screen. I also tryed it on my old PC which had java, It froze But before it frose it said i already had it installed (Which it wasnt anymore). So i though maybe its the CD or something. So my friend gives me his CD and i try, Yet again it stayed like that for 2 hours. I was so frustrated. I ended up Going to control panel and removed the java Web Start and deleted the J2sdk FOlder and deleted the java Plug in from where it locates it.
    I then decide to install Java again but this time it takes me to the uninstaller? Why did it try to install from this exe but after i deleted stuff both CD's Mine and my Friends take to to the uninstaller? Well anyway i decided to Uninstall it like it said"Java Forte 3 and Some other little thing" Then i waited and it said Uninstall Complete. I double click the exe on the CD again and it takes me to the uninstaller again? I was like WTF? How do i install Java? Its just the biggest pain? Why is it taking me there instead of the actuall installer?
    Also I dislike other java programs as 1, You cant Execute the code cause its only HTML compatible and or you need the JDK files accosiated with the JCreator which i cant Understand.
    Also i got Jreal and it actually worked, But there is no uninstaller for it and it has no Removeal in the Control panel? Whats up with that? Also its good how it works. But for some reason it doesnt accept the code properly as the buttons and labels just appear everywhere and stay there even if i change forms and are messed up compared to when i run it on Java Forte at School.
    Also i have a Major Problem with Jreal as it states everytime i run an Applet "Start Applet is not Initialized?" And it shows a Blank applet? Whats up with this? I got no Errors and i think it said Exit Statement:1. But It worked before then i tryed it and it does this all the time for all my Java Program Applets. So I have no idea. It really frustrates me as it was working and i did no changes to the code and it wont let me test any more :(! Why is this happenning to me?
    Please help me in the best way you can, I dont have much time, 7 Hours to be Precise to do it in!
    Please if you can help me with any problems about installing or evening trying to be able to run Jcreator(Dont understand How to link it with JDK) or any good Java Programs to download that are easy to use(I dont have enough time to read). I couldnt understand CoffeeCup as it was HTML only? and only could run as a Web Page! But any help on Any of these problems that i suffer including Jreal How to Uninstall? Plus Mainly trying to get Java Forte Runnign as that was the only one that was properly showed the correct format of my Coding Applet.

    Awww :(

  • My iphone is on recovery mode and i can´t turn on it, when i try to recover it from itunes i get: "unknown error (36), i´ve tried to do lot of things but i can´t  solve my problem. please help!!

    my iphone is on recovery mode and i can´t turn on it, when i try to recover it from itunes i get: unknown error (36), i´ve tried to do lot of things but i can´t solve my problem. please help!!

    Hi, i had the same problem. Try to find the file "apple" or "itunes" don't know it anymore exactly. Ahm well you need to delet any information or just plug in your iphone into an other computer. important is that your iphone never has been pluged in this computer before. This was what i did, and it worked!

  • Problem Please help me.....Let me know the area to look for it I am a DBA..

    Problem Please help me.....Let me know the area to look for it I am a DBA..Thanks in advance to let me know the cause and the area to look and fix it...
    Server Error in '/' Application.
    Problem with SAP/BAPI. SAP.Connector.RfcCommunicationException: Connect to message server failed Connect_PM MSHOST=prddb01.lamrc.com, R3NAME=PRD, GROUP=Prod HR PRD LOCATION CPIC (TCP/IP) on local host ERROR service 'sapmsPRD' unknown TIME Wed May 04 08:59:06 2005 RELEASE 620 COMPONENT NI (network interface) VERSION 36 RC -3 MODULE ninti.c LINE 428 DETAIL NiPServToNo SYSTEM CALL getservbyname COUNTER 1 at SAP.Connector.SAPConnection.ThrowRfcException(RFC_ERROR_INFO_EX rfcerrInfo, Encoding encoding, String languangeCode) at SAP.Connector.SAPConnection.Open() at SAP.Connector.SAPClient.RfcInvoke(String method, Object[] methodParamsIn) at SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn) at SoftwareKeySAPG.SAPProxy1.Z_Bapi_Load_Kpi_Region(ZSOFT_KPI_REGIONS_MTable&amp; Kpi_Regions, ZSOFT_PROD_TYPETable&amp; Prod_Type) at SoftwareKeySAPG.SAPGSK.LoadKPIRegion(DataSet dsProduct)
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.Web.Services.Protocols.SoapException: Problem with SAP/BAPI. SAP.Connector.RfcCommunicationException: Connect to message server failed Connect_PM MSHOST=prddb01.lamrc.com, R3NAME=PRD, GROUP=Prod HR PRD LOCATION CPIC (TCP/IP) on local host ERROR service 'sapmsPRD' unknown TIME Wed May 04 08:59:06 2005 RELEASE 620 COMPONENT NI (network interface) VERSION 36 RC -3 MODULE ninti.c LINE 428 DETAIL NiPServToNo SYSTEM CALL getservbyname COUNTER 1 at SAP.Connector.SAPConnection.ThrowRfcException(RFC_ERROR_INFO_EX rfcerrInfo, Encoding encoding, String languangeCode) at SAP.Connector.SAPConnection.Open() at SAP.Connector.SAPClient.RfcInvoke(String method, Object[] methodParamsIn) at SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn) at SoftwareKeySAPG.SAPProxy1.Z_Bapi_Load_Kpi_Region(ZSOFT_KPI_REGIONS_MTable&amp; Kpi_Regions, ZSOFT_PROD_TYPETable&amp; Prod_Type) at SoftwareKeySAPG.SAPGSK.LoadKPIRegion(DataSet dsProduct)
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
    Stack Trace:
    [SoapException: Problem with SAP/BAPI.
    SAP.Connector.RfcCommunicationException: Connect to message server failed
    Connect_PM  MSHOST=prddb01.lamrc.com, R3NAME=PRD, GROUP=Prod HR PRD
    LOCATION    CPIC (TCP/IP) on local host
    ERROR       service 'sapmsPRD' unknown
    TIME        Wed May 04 08:59:06 2005
    RELEASE     620
    COMPONENT   NI (network interface)
    VERSION     36
    RC          -3
    MODULE      ninti.c
    LINE        428
    DETAIL      NiPServToNo
    SYSTEM CALL getservbyname
    COUNTER     1
       at SAP.Connector.SAPConnection.ThrowRfcException(RFC_ERROR_INFO_EX rfcerrInfo, Encoding encoding, String languangeCode)
       at SAP.Connector.SAPConnection.Open()
       at SAP.Connector.SAPClient.RfcInvoke(String method, Object[] methodParamsIn)
       at SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn)
       at SoftwareKeySAPG.SAPProxy1.Z_Bapi_Load_Kpi_Region(ZSOFT_KPI_REGIONS_MTable&amp; Kpi_Regions, ZSOFT_PROD_TYPETable&amp; Prod_Type)
       at SoftwareKeySAPG.SAPGSK.LoadKPIRegion(DataSet dsProduct)]
       System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +1503
       System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +218
       SoftwareKeyUI.InstalledBaseDataWS.InstalledBaseData.LoadKPIRegionMulti(DataSet products)
       SoftwareKeyUI.InstalledBaseDataAccess.LoadKPIRegionMulti(DataSet products)
       SoftwareKeyUI.InstalledBase.GetRegionDetails(Int32 userId, String product, String regionType)
       SoftwareKeyUI.FilteredAccess.GetRegionDetails(Int32 userId, String product, String regionType)
       SoftwareKeyUI.search.LoadRegionDetails()
       SoftwareKeyUI.search.regionType_SelectedIndexChanged(Object sender, EventArgs e)
       System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e) +108
       System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent() +26
       System.Web.UI.Page.RaiseChangedEvents() +115
       System.Web.UI.Page.ProcessRequestMain() +1099

    The error is a very basic one - the sapmsPRD service is not known. You will have to go to <NT_ROOT>\system32\drivers\etc and add the entry sapmsPRD 3600 to this file.
    This is basically telling the requester at what port to look for the message server.
    C

  • Problem Please help me.....Let me know the area to look for it

    Problem Please help me.....Let me know the area to look for it I am a DBA..Thanks in advance to let me know the cause and the area to look and fix it...
    Server Error in '/' Application.
    Problem with SAP/BAPI. SAP.Connector.RfcCommunicationException: Connect to message server failed Connect_PM MSHOST=prddb01.lamrc.com, R3NAME=PRD, GROUP=Prod HR PRD LOCATION CPIC (TCP/IP) on local host ERROR service 'sapmsPRD' unknown TIME Wed May 04 08:59:06 2005 RELEASE 620 COMPONENT NI (network interface) VERSION 36 RC -3 MODULE ninti.c LINE 428 DETAIL NiPServToNo SYSTEM CALL getservbyname COUNTER 1 at SAP.Connector.SAPConnection.ThrowRfcException(RFC_ERROR_INFO_EX rfcerrInfo, Encoding encoding, String languangeCode) at SAP.Connector.SAPConnection.Open() at SAP.Connector.SAPClient.RfcInvoke(String method, Object[] methodParamsIn) at SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn) at SoftwareKeySAPG.SAPProxy1.Z_Bapi_Load_Kpi_Region(ZSOFT_KPI_REGIONS_MTable&amp; Kpi_Regions, ZSOFT_PROD_TYPETable&amp; Prod_Type) at SoftwareKeySAPG.SAPGSK.LoadKPIRegion(DataSet dsProduct)
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.Web.Services.Protocols.SoapException: Problem with SAP/BAPI. SAP.Connector.RfcCommunicationException: Connect to message server failed Connect_PM MSHOST=prddb01.lamrc.com, R3NAME=PRD, GROUP=Prod HR PRD LOCATION CPIC (TCP/IP) on local host ERROR service 'sapmsPRD' unknown TIME Wed May 04 08:59:06 2005 RELEASE 620 COMPONENT NI (network interface) VERSION 36 RC -3 MODULE ninti.c LINE 428 DETAIL NiPServToNo SYSTEM CALL getservbyname COUNTER 1 at SAP.Connector.SAPConnection.ThrowRfcException(RFC_ERROR_INFO_EX rfcerrInfo, Encoding encoding, String languangeCode) at SAP.Connector.SAPConnection.Open() at SAP.Connector.SAPClient.RfcInvoke(String method, Object[] methodParamsIn) at SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn) at SoftwareKeySAPG.SAPProxy1.Z_Bapi_Load_Kpi_Region(ZSOFT_KPI_REGIONS_MTable&amp; Kpi_Regions, ZSOFT_PROD_TYPETable&amp; Prod_Type) at SoftwareKeySAPG.SAPGSK.LoadKPIRegion(DataSet dsProduct)
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:
    [SoapException: Problem with SAP/BAPI.
    SAP.Connector.RfcCommunicationException: Connect to message server failed
    Connect_PM MSHOST=prddb01.lamrc.com, R3NAME=PRD, GROUP=Prod HR PRD
    LOCATION CPIC (TCP/IP) on local host
    ERROR service 'sapmsPRD' unknown
    TIME Wed May 04 08:59:06 2005
    RELEASE 620
    COMPONENT NI (network interface)
    VERSION 36
    RC -3
    MODULE ninti.c
    LINE 428
    DETAIL NiPServToNo
    SYSTEM CALL getservbyname
    COUNTER 1
    at SAP.Connector.SAPConnection.ThrowRfcException(RFC_ERROR_INFO_EX rfcerrInfo, Encoding encoding, String languangeCode)
    at SAP.Connector.SAPConnection.Open()
    at SAP.Connector.SAPClient.RfcInvoke(String method, Object[] methodParamsIn)
    at SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn)
    at SoftwareKeySAPG.SAPProxy1.Z_Bapi_Load_Kpi_Region(ZSOFT_KPI_REGIONS_MTable&amp; Kpi_Regions, ZSOFT_PROD_TYPETable&amp; Prod_Type)
    at SoftwareKeySAPG.SAPGSK.LoadKPIRegion(DataSet dsProduct)]
    System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +1503
    System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +218
    SoftwareKeyUI.InstalledBaseDataWS.InstalledBaseData.LoadKPIRegionMulti(DataSet products)
    SoftwareKeyUI.InstalledBaseDataAccess.LoadKPIRegionMulti(DataSet products)
    SoftwareKeyUI.InstalledBase.GetRegionDetails(Int32 userId, String product, String regionType)
    SoftwareKeyUI.FilteredAccess.GetRegionDetails(Int32 userId, String product, String regionType)
    SoftwareKeyUI.search.LoadRegionDetails()
    SoftwareKeyUI.search.regionType_SelectedIndexChanged(Object sender, EventArgs e)
    System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e) +108
    System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent() +26
    System.Web.UI.Page.RaiseChangedEvents() +115
    System.Web.UI.Page.ProcessRequestMain() +1099

    Hi
    You should make a mapping for the service sapmsPRD in your /etc/services file (On Windows: C:WINDOWSSYSTEM32DRIVERSETCservices). If your instance number is 00 you will have to add the following entry:
    sapmsPRD      3600/tcp
    Good luck!
    René van Es

  • [TV@Master] Problem please help

    I have Msi.mother board PT8-Neo -LSR ,  Model No.Ms-6799 , main board bios -Phonenix ,maind board version i updat it to 2.2 , cpu size 2.4 G celleron D/256/533 , memory size 256DDram (400),display card Nvidia Riva TNT2 model 64
    the problem that i face it when i put my TV@nywhere -master card ,the pc stop at the main page that show the biso version and name of bios company and the letters do not bost well it look like a virus work , and when i take tha card off the pc go normally , i tried put it to other PCI the same problem
    please help

    i meany by fix the problem of getting the pc go on to windows with card on PCI salot but i still have the broblem of the driver
    please read my reply again
    my operating system is win me and i have also another pc have XP
    when i log in to windows the system show that found my TV@nywhere card but it didnt took the installatin driver for it i tried to install the driver directly
    but it give me this 2 mesages  when i try to install the driver
    MSI TV card is not found ,stop the installation
    the other message is
    MSI pvs driver installatin failed
    i download the driver from msi page also give me the same messages
    for known on Device Manager it show me that the driver there but do not have the driver and the ? mark beside them
    what to do now 

  • I want to buy an in-app purchase but i don`t remember my security questions and i cant access my recovery email either, what can i do? i have 100$ on my account and cant use it because of that problem, please help URGENT

    I want to buy an in-app purchase but i don`t remember my security questions and i cant access my recovery email either, what can i do? i have 100$ on my account and cant use it because of that problem, please help URGENT

    If you have a rescue email address on your account then you can use that - follow steps 1 to 5 half-way down this page will give you a reset link on your account : http://support.apple.com/kb/HT5312
    If you don't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact Support in your country to get the questions reset : http://support.apple.com/kb/HT5699

  • I'm in trouble, my iPod Touch is giving 4th shock when recharge and the battery does not last any more. who knows or has a similar problem, please help me. Note: all this after I downloaded the new version OS5.

    I'm in trouble, my iPod Touch is giving 4th shock when recharge and the battery does not last any more. who knows or has a similar problem, please help me. Note: all this after I downloaded the new version OS5.

    I would make an appointment at the Genius Bar of an Apple store because of the shock issue. I doubt it was caused by the update.

  • My iphone 4 is acting like crap right i can't even restore it everytime i try to reboot it my iphone freezes at the apple logo it is ******* to the point where i just want to smash it how do i solve this problem please help?

    my iphone 4 is acting like crap right i can't even restore it everytime i try to reboot it my iphone freezes at the apple logo it is ******* me off to the point where i just want to smash it how do i solve this problem please help?

    Don't worry, just follow these steps to fix iPhone stuck on Apple logo
    => First of all Start your Computer and then connect with Internet connection, now Download the latest version of the iTunes application
    => Now install the iTunes application in your System and connect your Device with computer via Data cable
    => Now connect your Device with iTunes application and then Tab on summary option, see in the left side bar of iTunes
    => Now Select restore option from iTunes and then confirm the Restore Message for better results. After this unplug your Device and Restart it
    I hope that will surely
    Thank you...

  • Hello!i have problem to insttal potoshop cs6 this is,we've encountered the following issues.installer failed to initialize.this could be due to a missing file.please download adobe support advisor to detected the problem.please,help me

    this is,we've encountered the following issues.
    installer failed to initialize.this could be due to a missing file.please download adobe support advisor to detected the problem.
    please,help me!

    Hi there Mylenium, is there any way you can help me? My cs6 is doing all kinds weird things lately. The liquifying too stopped working completely, when I try to work with the actions, it starts flickering and changing opacity in color by itself. It starts flickering and is completely out of whack! I tried uninstalling and reinstalling and still no luck. I tried getting in touch with adobe and no luck with that neither! Is there anyway you might be able to help?

  • My iPad stop working suddenly i see black screen only pressing the home? and sleep button dose not solve the  problem please help?

    My iPad stop working suddenly i see black screen only pressing the home and sleep button dose not solve the problem please help ?

    Frozen or unresponsive iPad
    Resolve these most common issues:
        •    Display remains black or blank
        •    Touch screen not responding
        •    Application unexpectedly closes or freezes
    http://www.apple.com/support/ipad/assistant/ipad/
    iPad Frozen, not responding, how to fix
    http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    Black or Blank Screen on iPad or iPhone
    http://appletoolbox.com/2012/10/black-or-blank-screen-on-ipad-or-iphone/
    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    Home button not working or unresponsive, fix
    http://appletoolbox.com/2013/04/home-button-not-working-or-unresponsive-fix/
    Fixing an iPad Home Button
    http://tinyurl.com/om6rd6u
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
     Cheers, Tom

  • I am using firefox 3.6.17 i upgraded it to 4.1.but it does not work properly sometimes it opens every website and most of the time it does not work . so what is the problem please help . thank you

    i am using firefox 3.6.17 i upgraded it to 4.1.but it does not work properly sometimes it opens every website and most of the time it does not work . so what is the problem please help . thank you

    Did you check your security software (firewall)?
    A possible cause is security software (firewall) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process.
    See:
    * [[Server not found]]
    * [[Firewalls]]

  • My Ipad 2 does not turn on when not plugged to electricity. Even when plugged to electricity, it constantly restarts/switches itself off. what is the problem, please help??

    My Ipad 2 does not turn on when not plugged to electricity. Even when plugged to electricity, it constantly restarts/switches itself off. what is the problem, please help??

    i plugged it and pressed the home button for a few seconds. the connect to itunes screen appeared and the moment i disconnect the cable from the electric plug, it switches off. when i connect the cable to the PC, nothing happens, its as if nothing has been done.

  • X-Fi Fatal1ty Plat1num Champion Ed. problem, please help!

    9X-Fi Fatalty Platnum Champion Ed. problem, please help!? Hi there everyone,
    So i have a X-Fi Fatalty Platnum Champion Ed. and a computer with Windows 7.
    I've searched the web and i found many people saying that the card it's working and perfectly compatible so i would like to exclude this option as far as the problems that i'm having.
    So, right out of the box i've placed the front panel in with the ribbon cable and the power connected to it, then i connected the other end of the ribbon cable and finally placed the card in one of the PCI slots i have free.
    Now, when i start my PC, i don't hear any particolar "beep messages" but nothing will come on the screen, in few words my PC will not boot at all. I can hear the HDD spinning, everything sounds normal except for that "little" problem.
    So, i re-did all the connections thinking that maybe i did something wrong, but following the instruction i did exactly as told. So i tried again to power up the computer and i've noticed that the X-Fi logo is lit up (red light) and.. I don't really know if that means something or it's just something aside that doesn't really matter.. But, what is it's The PCI card is broken or there's something else?
    I did try to disable the sound card (integrated mobo sound) from the BIOS but that didn't change anything. I did try all the software options but this looks like more of an hardware problem (please correct me if i'm wrong and/or i've missed something).
    There's something that popped up in my mind.. the PSU. I noticed that i have a 300W PSU (mm.. low, isn't it's)?and i was wondering if that's enough or i need a more powerful one.. and if that's may be the case for the PCI to not work at all causing all i've already explained above. I mean.. It seems like i've installed a dead peripheral and that's impeding the computer to start up..
    I don't know.. I need clarification and help, PLEASE.
    Thank you very much in advance!

    Look at the beta thread sticked above but good luck waiting for a new driver. That beta driver has been there since January and although better than the normal driver it is still crap.
    All the boot type issues are with the SSD but if you getting in game crashes etc... under windows 8 that is simply that the driver stinks.

  • Hello sir my iphone screen turns off after using 2-5 minutes what would be the problem please help me out

    hello sir my iphone screen turns off after using 2-5 minutes what would be the problem please help me out

    To make sure that this is not software related, set it back to factory settings, without using any backup data afterwards. Set up the rest of the personal settings manually and test the phone. If it still does not work, this is a hardware issue and the phone has to be serviced by Apple or an Authorized Apple Service Provider:
    Use iTunes to restore your iOS device to factory settings - Apple Support
    Find an Apple Authorized Service Provider
    iPhone - Contact Support - Apple Support

Maybe you are looking for