Help to solve a swing problem

Hi,
I have to add a mouse over event and mouse click event in my rectangles that I draw while taking the values from an input file. Now since I am taking rectangle height and width from the input text file as well I also want to take a text value to be shown while moving a mouse over a particular rectangle from my input file. Also when user clicks on that rectangle the height and width of that particular rectangle only should be displayed (re-adjusted).
Now When my paint component draws these 2 rectangles and a user moves his mouse over the rectangle he should see text message attached to it:- Like for first row 10, 23 he should see "Hello". In this case when he clicks on this rectangle the picture should read just to show only 10 and 20 as height and width.
I am trying to write 2 classes. 1st one extends JPanel and the other one MouseInputAdapter.
Here is the input file example below:-
Height   Width  Test_To_Show   Colors
10          23         Hello        300
20          44         Bye          000Here is my attempted code but still not getting what I want :(
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.BufferedReader;
import java.util.List;
import java.awt.*;
import javax.swing.*;
import java.awt.Color;
import javax.swing.JFrame;
import java.awt.geom.Rectangle2D;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Graphics;
import javax.swing.event.*;
import java.awt.event.*;
import java.awt.event.MouseListener;
import java.awt.event.MouseEvent;
public class MousingExample extends JPanel {
    List<String> tips;
    JWindow toolTip;
    JLabel label;
    public String f[];
  public MousingExample(Frame f)
        tips = new ArrayList<String>();
        tips.add("Lets Start The Show");
        toolTip = new JWindow(f);
        label = new JLabel();
        label.setHorizontalAlignment(JLabel.CENTER);
        label.setOpaque(true);
        label.setBackground(UIManager.getColor("MousingExample.background"));
        label.setBorder(UIManager.getBorder("MosusingExample.border"));
        toolTip.add(label);
        setOpaque(true);
    public ArrayList<Rectangle> rects = new ArrayList<Rectangle>();
    public int width;
    public String color;
    public static int score;
    public static int value1;
    public static int value2;
    private final static int NUM_FIELDS = 4;
    public void InputReader() {
        String n = null; 
        try{
            BufferedReader fh = new BufferedReader(new FileReader("inputfile.txt"));   
            while((n = fh.readLine()) != null && (n = n.trim()).length() > 0){
               // System.out.println(n);
                f = n.split("\t");
                int height = Integer.parseInt(f[0].trim());
                int width = Integer.parseInt(f[1].trim());
                String message = f[2];
                Color color = new Color(Integer.parseInt(f[3]));
                Rectangle tempLineInfo = new Rectangle(color, value1, value2, width);
                rects.add(tempLineInfo);
            fh.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e2) {
            e2.printStackTrace();
    public void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2d = (Graphics2D) g;
        g2d.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        setBackground(Color.white);
        for(int i=0; i<rects.size(); i++){
            Rectangle c = rects.get(i);
            GradientPaint gpi = new GradientPaint(0, 0,c.getColor() , 0, 20, Color.white, true);
            g2d.setPaint(gpi);
            g2d.drawRect(c.value1, 20, c.width, 35);
            g2d.fillRect(c.value1, 20, c.width, 35);
            System.out.printf("Drawing at %s\n", c);
    public static void main(String[] args) {
        JFrame frame = new JFrame();
        MousingExample test = new MousingExample(frame);
        test.InputReader();
        Tipster tipster = new Tipster(test);
        test.addMouseListener(tipster);
        test.addMouseMotionListener(tipster);
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.setTitle("Trying To MouseOver");
        frame.setSize(400, 400);
        frame.setContentPane(test);
        frame.setVisible(true);
class Rectangle {
    private Color color;
    public int value1;
    public int value2;
    public int width;
    public Rectangle(Color c, int value1, int value2, int width){
        this.color = c;
        this.value1 = value1;
        this.value2 = value2;
        this.width = width;
    public Color getColor(){
        return color;
    public String toString() {
        return String.format("Color=%s,top=%d,bottom=%d,width=%d", color.toString(), value1, value2, width);
class Tipster extends MouseInputAdapter
    MousingExample Mousing;
    Point start;
    public Tipster(MousingExample tt)
        Mousing = tt;
    public void mousePressed(MouseEvent e) { }
    public void mouseReleased(MouseEvent e) { }
    public void mouseDragged(MouseEvent e) { }
    public void mouseMoved(MouseEvent e)
        List<Rectangle> rects = MousingExample.Rectangle;
        //Not Sure what I should do here
}Thanks in adavnce
Sheikh Chilly :)

Ok I will try to work more on your advice. This is my code so far after some more modifications. Plz do lemme know where I am making mistakes. Anyway thanks for guiding me.
import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.BufferedReader;
import java.util.List;
import java.awt.*;
import javax.swing.*;
import java.awt.Color;
import javax.swing.JFrame;
import java.awt.geom.Rectangle2D;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Graphics;
import javax.swing.event.*;
import java.awt.event.*;
import java.awt.event.MouseListener;
import java.awt.event.MouseEvent;
public class MouseExample extends JPanel {
    List<String> tips;
    JWindow toolTip;
    JLabel label;
    public String f[];
  public MouseExample(Frame f)
        tips = new ArrayList<String>();
     //   tips.add("Lets Start The Show");
        toolTip = new JWindow(f);
        label = new JLabel();
        label.setHorizontalAlignment(JLabel.CENTER);
        label.setOpaque(true);
        label.setBackground(UIManager.getColor("MouseExample.background"));
        label.setBorder(UIManager.getBorder("MosusingExample.border"));
        toolTip.add(label);
        setOpaque(true);
    public ArrayList<Rectangle> rects = new ArrayList<Rectangle>();
    public int width;
    public String color;
    public static int score;
    public static int value1;
    public static int value2;
    private final static int NUM_FIELDS = 4;
    public void InputReader() {
        String n = null; 
        try{
            BufferedReader fh = new BufferedReader(new FileReader("inputfile.txt"));   
            while((n = fh.readLine()) != null && (n = n.trim()).length() > 0){
               // System.out.println(n);
                f = n.split("\t");
                int height = Integer.parseInt(f[0].trim());
                int width = Integer.parseInt(f[1].trim());
                String message = f[2];
                tips.add(message);
                Color color = new Color(Integer.parseInt(f[3]));
                Rectangle tempLineInfo = new Rectangle(color, value1, value2, width);
                rects.add(tempLineInfo);
            fh.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e2) {
            e2.printStackTrace();
    public void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2d = (Graphics2D) g;
        g2d.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        setBackground(Color.white);
        for(int i=0; i<rects.size(); i++){
            Rectangle c = rects.get(i);
            GradientPaint gpi = new GradientPaint(0, 0,c.getColor() , 0, 20, Color.white, true);
            g2d.setPaint(gpi);
            g2d.drawRect(c.value1, 20, c.width, 35);
            g2d.fillRect(c.value1, 20, c.width, 35);
            System.out.printf("Drawing at %s\n", c);
      public boolean isToolTipShowing()
        return toolTip.isShowing();
       public void showToolTip(int index, Point p)
        for(index = 0; index<tips.size();index++){
        label.setText(tips.get(index));
        toolTip.pack();
        toolTip.setLocation(p);
        toolTip.setVisible(true);
    public static void main(String[] args) {
        JFrame frame = new JFrame();
        MouseExample test = new MouseExample(frame);
        test.InputReader();
        Tipster tipster = new Tipster(test);
        test.addMouseListener(tipster);
        test.addMouseMotionListener(tipster);
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.setTitle("Trying To MouseOver");
        frame.setSize(400, 400);
        frame.setContentPane(test);
        frame.setVisible(true);
class Rectangle {
    private Color color;
    public int value1;
    public int value2;
    public int width;
    public Rectangle(Color c, int value1, int value2, int width){
        this.color = c;
        this.value1 = value1;
        this.value2 = value2;
        this.width = width;
    public Color getColor(){
        return color;
    public String toString() {
        return String.format("Color=%s,top=%d,bottom=%d,width=%d", color.toString(), value1, value2, width);
class Tipster extends MouseInputAdapter
    MouseExample mousing;
    Point start;
    public Tipster(MouseExample tt)
        mousing = tt;
    public void mousePressed(MouseEvent e) { }
    public void mouseReleased(MouseEvent e) { }
    public void mouseDragged(MouseEvent e) { }
    public void mouseMoved(MouseEvent e)
Point p = e.getPoint();
        boolean traversing = false;
        List<Rectangle> rect = mousing.rects;
        for(int i; i<rect.size() ; i++ ){
            Rectangle r = rect.get(i);
            if(r.contains(p)) {
              if(!mousing.isToolTipShowing())
                    SwingUtilities.convertPointToScreen(p, mousing);
                    mousing.showToolTip(i, p);
                traversing = true;
                break;
}Thanks
Sheikh Chilly :)

Similar Messages

  • My imac stops(freezes) everytime when I try to extract ipod nano. So if I quit the connection by force, it stops again. Have no choice but to shut down the imac pushing power supply button. Pls help me solve out this problems.

    My imac stops everytime when I try to extract ipod nano. So if I do it by force it freezes agian. Have no choice but to shut down the computer
    by pushing power button. Pleas help me solve this out!!!
    It's not good to shut off the power forcibly, right? (I dun know what else I can do...)

    Hi Min! I'm having exactly the same issue - have been putting up with it now for months but have finally had enough! Every single time i eject either my iphone, ipad or ipod nano, itunes freezes up, the computer becomes unresponsive. Usually i can use the mouse to highlight icons but the system doesn't respond, the keyboard doesn't work and I have to do a hard reset.
    Arrrrrggggggh!!!!!!! lol
    Someone please help!!!

  • Need Help In Solving Rotation Image Problem

    1 down vote favorite
    Hi guys ,
    I need your help please. I have spent hours trying to solve it but not working.
    I have an image i am rotating when the user clicks on a button. But it is not working.
    I would like to see the image rotating gradually till it stops but it doesn't. This it what it does. After i click the button, i don't see it rotating. But when i minimize and maximize the main window, i see the image just rotate(flip) fast like that. It does the rotation but i don't see it as it is doing. It just rotate in a second after minimize and maximize the main window.
    I thimk the problem deals with updating the GUI as it is rotating but i don't know how to fix it.
    these are the code . Please i have trimed down the code for easy reading.
    public class KrusPanel extends JPanel{
         private Image crossingImage;
         private int currentRotationAngle;
         private int imageWidth;
         private int imageHeight;
         private AffineTransform affineTransform;
         private boolean clockwise;
         private static int ROTATE_ANGLE_OFFSET = 2;
         private int xCoordinate;
         private int yCoordinate;
         private javax.swing.Timer timer;
         private void initialize(){
          this.crossingImage = Toolkit.getDefaultToolkit().getImage("images/railCrossing3.JPG");
          this.imageWidth = this.getCrossingImage().getWidth(this);
          this.imageHeight = this.getCrossingImage().getHeight(this);
          this.affineTransform = new AffineTransform();
          this.setCurrentRotationAngle(90);
          timer = new javax.swing.Timer(20, new MoveListener());
    public KrusPanel (int x, int y) {
      this.setxCoordinate(x);
      this.setyCoordinate(y);
      this.setPreferredSize(new Dimension(50, 50));
      this.setBackground(Color.red);
      TitledBorder border = BorderFactory.createTitledBorder("image");
      this.setLayout(new FlowLayout());
      this.initialize();
    public void paintComponent(Graphics grp){
               Rectangle rect = this.getBounds();
               Graphics2D g2d = (Graphics2D)grp;
               g2d.setColor(Color.BLACK);
               this.getAffineTransform().setToTranslation(this.getxCoordinate(), this.getyCoordinate());
               this.getAffineTransform().rotate(Math.toRadians(this.getCurrentRotationAngle()), this.getCrossingImage().getWidth(this) /2,
                                       this.getCrossingImage().getHeight(this)/2);
              g2d.drawImage(this.getCrossingImage(), this.getAffineTransform(), this);
    public void rotateCrossing(){
                 this.currentRotationAngle += ROTATE_ANGLE_OFFSET;
                 int test = this.currentRotationAngle % 90;
                 if(test == 0){
                  this.setCurrentRotationAngle(this.currentRotationAngle);
                  timer.stop();
             repaint();
      private class MoveListener implements ActionListener {
             public void actionPerformed(ActionEvent e) {
                rotateCrossing();
                repaint();
    //  There are getters and setters method here but i have removed them to make the code shorter.
    }Next 2 Classes
    // I have removed many thins in this class so simplicity. This class is consists of Tiles of BufferdImage and the
    // KrusPanel class is at the array position [2][2]. It is the KrusPanel class that i want to rotate.
    public class SeePanel extends JPanel{
          private static KrusPanel crossing;
          private void initializeComponents(){
       timer = new javax.swing.Timer(70, new MoveListener());
       this.crossing = new CrossingPanel(261,261);
        public SeePanel(){
      this.initializeComponents();
         public void paintComponent(Graphics comp){
       super.paintComponent(comp);
      comp2D = (Graphics2D)comp;
      BasicStroke pen = new BasicStroke(15.0F, BasicStroke.CAP_BUTT,BasicStroke.JOIN_ROUND);
         comp2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                 RenderingHints.VALUE_ANTIALIAS_ON);
         comp2D.setPaint(Color.red);
         comp2D.setBackground(Color.WHITE);
         comp2D.drawImage(img, 0, 0, null);
         comp2D.draw(this.horizontalRail);
         this.crossing.paintComponent(comp2D);
         this.rob.drawRobot(comp2D);
      public static void rotateCrossing(){
       this.crossing.getTimer().start();
       repaint();
    // i tried below code also it didn't work. so i put them in comments
       Runnable rotateCrossing1 = new Runnable(){  // to be removed
             public void run() {
            crossing.getTimer().start();
          SwingUtilities.invokeLater(rotateCrossing1);
    // MAIN CLASS
    // This is the GUI class which consists of buttons and others
    public class MainAPP{
       SeePanel = new SeePanel();
      // Buttons declarations here and others
    public MainAPP(){
      // all listener registers here
    // Here i call the rotateCrossing() of the SeePanel class but it is not working as i want.
    // I would like to see the image rotating gradually till it stops but it doesn't.
    //This it what it does. After i click the button, i don't see it rotating. But when i minimize and maximize the main window,
    // i see the image  just rotate(flip) fast like that.
    public void actionPerformed(ActionEvent e){
        SeePanel.rotateCrossing();                 
        public static main(string[] str){
    }Please do help me to fix it.
    thanks

    kap wrote:
    1 down vote favoriteHuh?
    ..Please i have trimed down the code for easy reading. ..Perhaps I am just lazy, but I don't actually like reading code until I've seen it compile in my editor & run. That is why I will advise that for better help sooner, post an SSCCE. For SSCCEs that use images, either generate an image in the code, or hot-link to an image available on the internet. I offer some [images at my site|http://pscode.org/media/#image] that you can hot-link to.

  • Help to solve this simple problem- please

    Hi !
    Is there any method to resolve this problem.
    In my db there are 2 tables called Employee and Insurance. There fields as follows.
    Employee(empno,name,age,address,phone)
    Insurance(empno,insurName,insurCompany)
    Now I want to do this.In my HTML form,there are textboxes to input all of these data.
    Eg: empno,name,age,address,phone,insurName,insurCompany (All of these enter into 1 form)
    Now my problem is, how to save these data into the 2 seperate tables by using PreparedStatement.See am I right?
    INSERT INTO Employee,Insurance VALUES (?,?,?,?,?,?,?);
    Is it right? I'am confusing about these para's, because how can I tell to insert that first para (empno) into 2 tables.
    I using Java2 SDK,JSP,TOMCAT with MySQL db for this.
    Please anyone can answer this, help me.

    No, you need one INSERT statement for each table.

  • Can anyone help me solve a krypto problem with iterators?

    anyone can help me I am desperately trying to write a method takes a target and an array of non-zero values, and returns true if there is a Krypto solution.
    A krypto solution is one that you are given a set of non-zero int values and an int target.
    Your goal is to form an arithmetic expression using those numbers (in any order) and the operators +, -, *, /, or %.
    You must use each value exactly once, though you can use operators any number of times.
    this is the start of the test method I have to work with:
    public static void testSolveKrypto() {
    // 1 + 2 * 3 + 4 = 13, among others
    verify(solveKrypto(13,new int[]{1,2,3,4}));
    // 1 + 3 * 4 - 2 = 14, among others
    verify(solveKrypto(14,new int[]{1,2,3,4}));
    // No solution for 29:
    verify(!solveKrypto(29,new int[]{1,2,3,4}));
    // harder problems with solutions
    verify(solveKrypto(80,new int[]{2, 6, 7, 8}));
    verify(solveKrypto(-59, new int[]{4, 6, 8, 9, 10}));
    verify(solveKrypto(-1240,new int[]{5, 6, 7, 15, 16, 19}));
    verify(solveKrypto(145927, new int[]{5, 21, 22, 77, 81, 89, 94}));
    // harder problems without solutions
    // interesting aside: in each case, the given target is the first positive
    // target which is not solvable for the given set of numbers!
    verify(!solveKrypto(33,new int[]{2, 6, 7, 8}));
    verify(!solveKrypto(131, new int[]{4, 6, 8, 9, 10}));
    verify(!solveKrypto(949,new int[]{5, 6, 7, 15, 16, 19}));
    verify(!solveKrypto(10486, new int[]{5, 21, 22, 77, 81, 89, 94}));
    if anyone can help or get me started that would greatly be appreciated

    h1. {color:red}CROSS-POST{color}
    [http://forum.java.sun.com/thread.jspa?messageID=10174551]

  • I need help to solve the following problem

    EMPLOYEES with coulmns
    employee_id number, first_name varchar2(50), last_name varchar2(50), salary number, deptno number, manager number, date_of_join date, date_of_birth date.
    DEPARTMENT with columns
    deptno number, dept_name varchar2(100),location varchar2(100);
    --Proper exceptions should be handled in all procedures and functions
    7. Create a package "Salary_revision" as per steps given below.
    1. Write a function "Update_salary" in the package that accepts two parameters
    "Employee_id" and "Sal_raise"-Number, return type should be Number.
    · Function "Update_salary" should be an AUTONOMOUS TRANSACTION function.
    · The function should accept the employee id and the amount of salary to be raised.
    · There should be an update statement which will update the employee table for each
    employee id with the current salary + salary to be raised.
    After updating the employee table with the new salary , function should return the new salary back.
    Q8. Write a PL/SQL block which will fetch all employee id and their salary into a pl/sql table from the employees table .
    1. The Pl/sql table should have two columns to hold the employee id and salary
    2. Loop through the pl/sql table (before starting the loop, a check condition should be provided to see if the pl/sql table is empty.
    3. For each record in the pl/sql table loop, call the function "Update_salary" from the package "Salary_revision" created in "Question 7" .
    4. Pass the values for parameter “employee_id” and “Sal_raise”.
    Value for employee id should be the value fetched from pl/sql table
    For parameter "sal_raise" , pass value based on the formula given below
    Pass 10% of current salary if the current salary is greater than 20lakhs.
    Pass 15% of salary if the current salary is greater than 15 lakhs and less than 20 lakhs.
    Pass 18% of salary if current salary is greater than 10 lakhs and less than 15 lakhs.
    Pass 20% of salary if current salary is less than 10 Lakhs.
    5. The new salary returned should be displayed along with Employee last name and first name (use DMS_out.put_line)
    Q9. Create a package Employee_lib with functions as given below.
    1. Create a Function get_emp_doj_dept that will accept the employee id and return his date of join and department number, both these values should be returned together in a record type variable.
    2. Create another function get_emp_doj that will accept the employee id and department number as parameter. The function should fetch only his date of join and return the same. (Appropriate return type variable should be declared).
    3. Create a function get_emp_birthday that will accept department number as parameter.
    The first name and last name of all the employees whose birth day falls on the
    system date should be populated in a PL/SQL table. (Declare this pl/sql table in the package specification). Function “Get_emp_birthday” should return the count of employees fetched.
    Q10. Create a package Employee_lib_overload functions as geiven below.
    1. Create one function "get_emp_doj_bday". This function should be overloaded to handle the functionality of all 3 functions get_emp_doj_dept" , "get_emp_doj" and "get_emp_birthday" created in question #9.
    * If the user calls the function "get_emp_doj_bday" with only employee id as parameter, then it should perform the same functionality of function "get_emp_doj_dept" as in question #9.
    * If the user calls the function "get_emp_doj_bday" with employee id and department number as parameter, then the function should perform the same functionality of "get_emp_doj" as in question #9.
    * If the user calls the function "get_emp_doj_bday" with department number as parameter then it should perform the same functionality of function "get_emp_birthday" as in question #9.

    This is not a homework solving forum. Do your own work and get back here if you have any specific problem.

  • Thanks to this community's help, I solved my adware problem. (Hats off to Thomas, The Safe Mac).  Now my Safari pages are taking very long to load-sometimes not at all.  HELP!

    Last night I got the community's help in eliminating [I think] my adware problem. THANK YOU Thomas and Mike! Today my Safari webpages are loading at a snail's pace, and sometimes just get stuck.  What's the problem now?

    HI Robert ...
    Might be a cache or extension issue...
    Open a Finder window. From the Finder menu bar click Go > Go to Folder
    Type or copy paste the following
    ~/Library/Caches/com.apple.Safari/Cache.db
    Click Go then move the Cache.db file to the Trash.
    Quit and relaunch Safari to test.
    If that didn't help, try troubleshooting Safari extensoins.
    From the Safari menu bar click Safari > Preferences then select the Extensions tab. Turn that OFF, quit and relaunch Safari to test.
    If that helped, turn one extension on then quit and relaunch Safari to test until you find the incompatible extension then click uninstall.

  • Please help out solve this small problem.

    I am using j2sdk1.4.1. I am getting this error whenever i am trying to connect oracle8i:-
    Exception in thread "main" java.sql.SQLException: 20
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:407)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:152)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va:214)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:193)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at Employee.main(Employee.java:9)
    Can u please guide me to getsolved this problem?
    Thanks in advance.
    shrikanth

    How about posting some of you code. It might help to see why you are getting an error.

  • Can you help me solve ical synch problem going from iPhone to MacBook Air?

    My iPhone calendar contains a lot of important meetings. I am about to migrate from my 3GS to iPhone 5 but since I cannot seem to properly synchronize my iCal from my iPhone to to my MacBook Air, i.e. I cannot see any events from my iPhone in my Mac's calendar. I am thus afraid to activate and jump to my iPhone 5, which is collecting dust at this point, because if this calendar fails to reemerge from the "Cloud" I am in deep horsedung.
    I have all of the iCloud settings turned on for synching. I have gone to Storage and Backup and hit Synch Now and that update seems to occur via any feedback my iPhone is giving me.
    I have a suspicion that since I was forced to create a 2nd account in order to synch "Notes" to the iCloud that such may be causing some of the problems, but honestly, prior to doing that I synched to iCloud so this inability to see my iPhone calendar on my Mac is more longstanding.
    I also cannot seemingly log out of iCloud with one ID on my MacBook Air and sign in with another without iCloud telling me that I am going to lose all of my Contacts and previous data that I synched up with the current ID. What's that all about? That does not seem like typically brilliant Apple Design to me. Most of end up with more than one Apple ID, especially since the "Notes" synch forces you to sign up for yet another iCloud ID. I thoroughly researched that problem online at many forums before reluctantly adding another Apple ID.
    My environment is MacBook Air OS X 10.7.4 and 3GS with IOS 5 (iPhone 5 with undoubtedly IOS 6 sitting in the hangar)
    Thanks for any insight in advance.

    My iPhone calendar contains a lot of important meetings. I am about to migrate from my 3GS to iPhone 5 but since I cannot seem to properly synchronize my iCal from my iPhone to to my MacBook Air, i.e. I cannot see any events from my iPhone in my Mac's calendar. I am thus afraid to activate and jump to my iPhone 5, which is collecting dust at this point, because if this calendar fails to reemerge from the "Cloud" I am in deep horsedung.
    I have all of the iCloud settings turned on for synching. I have gone to Storage and Backup and hit Synch Now and that update seems to occur via any feedback my iPhone is giving me.
    I have a suspicion that since I was forced to create a 2nd account in order to synch "Notes" to the iCloud that such may be causing some of the problems, but honestly, prior to doing that I synched to iCloud so this inability to see my iPhone calendar on my Mac is more longstanding.
    I also cannot seemingly log out of iCloud with one ID on my MacBook Air and sign in with another without iCloud telling me that I am going to lose all of my Contacts and previous data that I synched up with the current ID. What's that all about? That does not seem like typically brilliant Apple Design to me. Most of end up with more than one Apple ID, especially since the "Notes" synch forces you to sign up for yet another iCloud ID. I thoroughly researched that problem online at many forums before reluctantly adding another Apple ID.
    My environment is MacBook Air OS X 10.7.4 and 3GS with IOS 5 (iPhone 5 with undoubtedly IOS 6 sitting in the hangar)
    Thanks for any insight in advance.

  • Since Ios 7 Update of my iPhone 5 I can not log into any WLAN any more - who can help to solve this major problem

    Hi all,
    I updated my iPhone 5 recently to IOS 7 - Since then I do not get any access to my home WLAN / WIFI with the iphone 5.
    At same time the iphone 3S and IPAD 1 of my wife (both IOS 5.x) still work fine in our homes WLAN / WIFI.
    Who can help to get my Iphone 5 with IOS 7 back to work in the home WIFI ?
    Thanks in advance for any possible solution.
    Best regards
    Dirk from Hamburg Germany

    Try this first.
    On the iPhone go to Settings > General > Reset and select Reset Network Settings.
    This will erase all saved wi-fi networks and settings.
    If no change after this, try resetting your modem and wireless router. Disconnect the router from the power source followed by disconnecting the modem from the power source. Wait a few minutes followed by powering your modem back on allowing it to completely reset before powering your wireless router back on allowing it to completely reset with the modem.

  • Help me solve the "ANSWER" problem.

    Hello, im new here, and im a new java student.
    i've written a program. however, the program asks the user a question, the user needs to answer either 1 or 2. i need the program to ask the question as long as the user doesnt enter 1 or 2. so if the user enters "2365" or "addasda" it will ask the question again.
    this is the main class:
    import java.util.Random;
    public class Game
         private String name;
         private String answer;
         private int numMarbles;
         private int marblesTaken;
         private int pcMarblesTaken;
         int exit;
         int exit2;
         public Game(String name)
              this.name = name;
         public String getName()
              return name;
         public boolean goodInput()
              //do
              //     if(exit==1)
              //          return true;
                   if(exit2 == 1 || exit2==2)
                        return true;
                        return false;
              //while(!goodInput());
    }This is the test class:
    import java.util.Random;
    import java.util.Scanner;
    public class GameTester
         public static void main (String [] args)
              Scanner input = new Scanner(System.in);
              int exit;
              do
                   System.out.print("what is your name: ");
                   String name = input.next();
                   Game howdy = new Game(name);          
                   int exit2;
                   do
                        System.out.println("Hello " + howdy.getName() + " Do you want to go first? (1)Yes, (2)No");
                        exit2 = input.nextInt();
                   while(howdy.goodInput());
                   System.out.println("You must enter either 1 for Yes or 2 for No");
                        if(exit2==1)
                             Random random = new Random();
                             int min = 10;
                             int max = 100;
                             int diff = max - min + 1;
                             int numMarbles = random.nextInt(diff) + min;
                             System.out.println("the number of marbles is: " + numMarbles);
                             while(numMarbles > 1)
                                  System.out.print("How many marbles you want to remove? ");
                                  int marblesTaken = input.nextInt();
                                  numMarbles = numMarbles - marblesTaken;
                                  System.out.println("the number of marbles left is " + numMarbles);
                                  System.out.println("It is now the computer's turn");
                                  int pcMarblesTaken = random.nextInt(numMarbles/2)+1;
                                  System.out.println("the computer has taken " + pcMarblesTaken + " marbles");
                                  numMarbles = numMarbles - pcMarblesTaken;
                                  System.out.println("the number of marbles left is: " + numMarbles);
                                  if (numMarbles==1)
                                       System.out.println(howdy.getName()+ " You lose");
                                       break;
                                  System.out.println("It is now your turn");               
                        else
                             Random random = new Random();
                             int min = 10;
                             int max = 100;
                             int diff = max - min + 1;
                             int numMarbles = random.nextInt(diff) + min;
                             System.out.println("the number of marbles is: " + numMarbles);
                             while(numMarbles > 1)
                                  int pcMarblesTaken = random.nextInt(numMarbles/2)+1;
                                  System.out.println("the computer has taken " + pcMarblesTaken + " marbles");
                                  numMarbles = numMarbles - pcMarblesTaken;
                                  System.out.println("the number of marbles left is: " + numMarbles);
                                  System.out.println("It is now your turn");
                                  System.out.print("How many marbles you want to remove? ");
                                  int marblesTaken = input.nextInt();
                                  numMarbles = numMarbles - marblesTaken;
                                  System.out.println("the number of marbles left is " + numMarbles);
                                  if (numMarbles==1)
                                       System.out.println(howdy.getName()+" You Win!!");
                                       break;
                                  System.out.println("It is now the computer's turn");
              System.out.print("Do you want to play again? (1)Yes, (2)No ");
              exit = input.nextInt();          
              while(exit==1);
              System.out.println("Thanks for playing with us!");               
    }     

    The question is.
    How do i make the program ask the question
    System.out.println("Hello " + howdy.getName() + " Do you want to go first? (1)Yes, (2)No");as long as the user enters the correct answer.
    so if they enter "adsdds" or "45" it will repeat the question again.

  • Need to solve serious security problem with Oracle Reports URL

    As mentioned repeatedly on this forum, Oracle Reports allows serious security breaches that allow users to see reports that they did not generate -- it's easy to guess a legal URL by changing the getjobid parameter.
    I've reviewed the JavaDocs to part of the rwrun.jar file and reviewed some of the example report plugins. This shows promise in helping to solve this security problem but critical pieces are missing.
    1) The javadocs are accurate for only 10g (9.0.4) but not correct for 10g (10.1.2+), which we are currently using. I need access to the updated version of this javadoc.
    2) Even with the updated version of the JavaDoc, I haven't found a class from which to inherit that would give me the opportunity to generate random jobid values, which then would effectively prevent users from guessing other jobid values, and thereby gaining access to other's reports (which in our cases, may contain sensitive information.
    3) We have found that we can send the parameter=value of EXPIRATION=1 which helps protect such information, but this requires that every program which invokes a report be modified to add this parameter. It would be far better for the report server to be configured to use a java class we write that inherits from some rwrun.jar class that would by default, add the EXPIRATION=1 parameter.

    Hi,
    Thanks for our replies. I will ask to an administrator about this security problem, now I know it depends of a security parameter.
    But I would know if it could be possible to hide the technical name of the query in the url. It could improve the security level of our reports in a first time in this way.
    Thanks a lot,
    JW.

  • I am not able to launch FF everytime i tr to open it, it says FF has to submit a crash report, i even tried doing that and the report was submitted too, but stiil FF did not start, and the problem still persists, please help me solve this issue in English

    Question
    I am not able to launch FF everytime i try to open it, it says FF has to submit a crash report,and restore yr tabs. I even tried doing that and the report was submitted too, but still FF did not start, and the problem still persists, please help me solve this issue
    '''(in English)'''

    Hi Danny,
    Per my understanding that you can't get the expect result by using the expression "=Count(Fields!TICKET_STATUS.Value=4) " to count the the TICKET_STATUS which value is 4, the result will returns the count of all the TICKET_STATUS values(206)
    but not 180, right?
    I have tested on my local environment and can reproduce the issue, the issue caused by you are using the count() function in the incorrect way, please modify the expression as below and have a test:
    =COUNT(IIF(Fields!TICKET_STATUS.Value=4 ,1,Nothing))
    or
    =SUM(IIF(Fields!TICKET_STATUS=4,1,0))
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • TS1717 I got this message every time i connect my iphone to itunes.. said 'iTunes was unable to load provider data from Sync Services. Reconnect or try again later.' so please help me to solve out this problem..

    I got this message every time i connect my iphone to itunes.. said 'iTunes was unable to load provider data from Sync Services. Reconnect or try again later.' so please help me to solve out this problem..

    In the course of your troubleshooting to date, have you also worked through the following document?
    iTunes for Windows: "Unable to load data class" or "Unable to load provider data" sync services alert

  • I have problem with daq..when it is connected with laptop it asks for all the options like sampling rate etc..It displays building VI and it stops..it is not processing further..cau u plz help to solve this problem

    i hav problem with daq initialisation...plz help to solve the above mentioned issue

    Hi muthu,
    we also have a problem: to less information…
    - What is connected to your laptop?
    - What is "it" in "it displays building VI"? Do you use the DAQ Assistent ExpressVI?
    - What means "plz"?
    And could you please put less text in the title of your message and more text (with relevant information) into the message body?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

Maybe you are looking for

  • Bug in Illustrator CS6 pattern options palet

    I found out that it was not possible to create a patern swatch with a single copy of 1x1. The preview window kept showing at least a 3x3 version and if you drag the swatch from your swatches pallet it copies 3x3 swatch. Does any one else experienced

  • Problem with podcast after update

    I downloaded iTunes 7 and updated my iPod firmware last night. Since then iTunes downloaded the latest episode of a podcast I subscribe to. The latested podcast appears in iTunes (in podcasts) but cannot be played in iTunes. I double click on it but

  • How do I go back to an older version of Firefox?

    It takes FOREVER to load a page!! I had NONE of these problems with the older version.

  • IMac G5 iSight 2.1 three beeps

    I have an Apple certified refurb iMac as described above. It suddenly failed last night. When I try to start it up, it has a blank blue screen with a repeating three beep pattern. After a while the screen question mark symbol comes up. I'm assuming i

  • SAP ERP Central Component - SAP Library

    To add a comment, please log in or register on the top of this page and choose Reply. Please write your comment in English. You can also go back to the SAP help page.