The circle is not display

Dear all
Why the circle not display on the panel?
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class CustomPanel1 extends JFrame { 
private final String list[] = { "Circle"};
private FlowLayout layout1, layout3;
private DrawShape drawPanel;
private JComboBox shapeList;
private JTextField textField1, textField2;
public static int size;
public CustomPanel1() {   
// create custom drawing area
drawPanel = new DrawShape();
shapeList = new JComboBox(list);
shapeList.setMaximumRowCount(3);
//add ItemListener
shapeList.addItemListener(
new ItemListener(){
// handle item state change event
public void itemStateChanged (ItemEvent event) {                  
if(event.getStateChange() == ItemEvent.SELECTED){
// draw circle
if( shapeList.getSelectedIndex() == 0){           
DrawShape.shape = 0;
drawPanel.draw( DrawShape.Circle);
} // end if
JPanel parameterPanel = new JPanel();
layout1 = new FlowLayout();
parameterPanel.setLayout(layout1);
parameterPanel.setBackground( Color.PINK );
layout1.setAlignment( FlowLayout.CENTER);
parameterPanel.add( new JScrollPane(shapeList));
JPanel textPanel = new JPanel();
layout3 = new FlowLayout();
parameterPanel.setLayout(layout3);
textPanel.setBackground( Color.PINK );
layout3.setAlignment( FlowLayout.CENTER);
textField1 = new JTextField( "Size");
textField1.setFont(new Font("Serif",Font.BOLD,14));
textField1.setEditable (false);
textField2 = new JTextField( "",6);
textField2.setFont(new Font("Serif",Font.BOLD,14));
// add ActionListener
textField2.addActionListener(
new ActionListener(){
// handle action perform event
public void actionPerformed (ActionEvent event) {         
JTextField field = (JTextField)event.getSource();
String entry = field.getText();
size = Integer.parseInt(entry);
} // end handle
} // end anonymous inner class
); // end call to addActionListener
textPanel.add(textField1, BorderLayout.NORTH);
textPanel.add(textField2, BorderLayout.SOUTH);
// set up the combine panel of parameterPanel and textPanel
GridLayout gridLayout = new GridLayout();
gridLayout.setRows(2);
gridLayout.setColumns(1);
JPanel combinPanel = new JPanel();
combinPanel.setBackground( Color.PINK );
combinPanel.setLayout(gridLayout);
combinPanel.add(parameterPanel, BorderLayout.NORTH);
combinPanel.add(textPanel, BorderLayout.SOUTH);
Container container = getContentPane();
container.add( combinPanel, BorderLayout.NORTH);
container.add( drawPanel, BorderLayout.CENTER );
// container.add( dataPanel, BorderLayout.SOUTH );
setSize( 500, 500 );
setVisible( true );
} // end constructor CustomPanelTest
// main
public static void main ( String args[] ) {   
CustomPanel1 app = new CustomPanel1();
app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
} // end main
} // end class CustomPanelTest
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class DrawShape extends JPanel {
public final static int Circle = 0, Square = 1, Triangle = 2;
public static int shape;
public static int xPos,yPos;
CustomPanel1 client;
boolean shapeWasCreated = false;
public DrawShape(){
public DrawShape(CustomPanel1 customer){     
this.client = customer;
addMouseListener(
new MouseAdapter() {  // anonymous inner class
// handle mouse press event
public void mousePressed( MouseEvent event )
xPos = event.getX();
yPos = event.getY();
shapeWasCreated = true;
repaint();
} // end handle
} // end anonymous inner class
); // end call to addMouseListener
} // end method
public void draw( int shapeToDraw )
shape = shapeToDraw;
repaint();
} //end method
} // end class
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class DrawCircle extends DrawShape {
CustomPanel1 client;
public static double circleArea, circlePerimeter;
public DrawCircle(CustomPanel1 circleCustomer){     
super(circleCustomer);
this.client = circleCustomer;
} // end method
public void paintComponent( Graphics g )
super.paintComponent( g );
initializeShapeVariables();
if ( shape == Circle ) {        
g.drawOval(xPos ,yPos , CustomPanel1.size, CustomPanel1.size );
} //end if
private void initializeShapeVariables(){
area = 0;
perimeter = 0;
circleArea = 0;
circlePerimeter = 0;
} // end method
// set shape value and repaint
public void draw( int shapeToDraw ) {    
shape = shapeToDraw;
repaint();
} //end method
} // end class

First, try a system reset.  It cures many ills and it's quick, easy and harmless...
Hold down the on/off switch and the Home button simultaneously until you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  It could take well over an hour!  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."
At the end of the basic Restore, you will be asked if you wish to sync the iPad/iPod.  As before, say "yes."  Note that that sync selection will disappear and the Restore will end if you do not respond within a reasonable time.  If that happens, only the apps that are part of the IOS will appear on your device.  Corrective action is simple -  choose manual "Sync" from the bottom right of iTunes.
If you're unable to do the Restore, go into Recovery Mode per the instructions here.  Since you have chosen not to maintain a backup, Recovery Mode will result in complete loss of data.  Anything obtained from the iTunes Store can be downloaded again but everything else will be gone forever.

Similar Messages

  • View the .rtf file not display the data in BI Publisher Enterprise.

    Hi,
    Platform: OBIEE 10g in NT XPsp2
    View the .rtf file not display the data in BI Publisher Enterprise.
    Step 1, I created Answer-request, create .rtf file with Word and add the request name, Add bar chart and table, preview PDF is working fine with data, Upload this template to Answers, View Template from Answer is working fine with data.
    Step 2, Answers – More Products > BI Publisher > My Folders > Create a new report > Edit > Data Model > New > Type: SQL Query > Data Source: Oracle BI EE > Query Builder > from SupplierSales assign Customer, Periods, Sales Facts (select Region, state, Year, Units Shipped) > Results > Save > Save
    Click Layouts > New > enter Name ….. > Click Layouts > borrows .rtf file in Manage T file > Upload > Save > Click View
    It is showing only the .rtf file without data. Why there is no data?
    Please guide me to solve this issue.
    Thanks,
    Jo

    Thanks for you reply,
    Our scenario is this report is basically a dissconnected mode report... we are developing these reports for mobile clients.
    We dint face this kind of issue while developing other reports.
    So please let us know if you have any idea on why we are facing this issue.
    Regards,
    Maneesh

  • The menubar will not display in full screen

    Hi.
    I have a strange problem in fullscreen mode, on my Macbook pro 15"
    I LOVE fullscreen, and infact the next macbook I will get is the 11" air because of its size and because full screen is so nice to work with.
    But I have a strange problem which I can't find a solution for.
    Suddenly the menubar will not display it self when I move the mouse to the top of the screen. The only way I can access the menu bar is by exiting full screen (ctrl + Cmd + F) and the toggel it back on after I have used the menubar
    This actually makes fullscreen mode useless and its driving me nuts, because this should not happen on Apple software. I would expect these sorts of behaviour on windows but not in osx.
    Anybody have a hint about what to do?

    https://discussions.apple.com/thread/3881124?start=0&tstart=0     <<<<< GO THERE
    Try this:  make a temporary, backup copy (if you don't already have a backup copy) of the library and try the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home()/Library/ Preferences folder.
    2 - delete iPhoto's cache file, Cache.db, that is located in your
         User/Home()/Library/Caches/com.apple.iPhoto folder. 
    Click to view full size
    3 - launch iPhoto and try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto.  You'll also have to reset the iPhoto's various preferences.

  • When I click on an active link from another application, it opens the firefox application, but won't open open the page - it just opens Firefox or takes me to Firefox. No new tab or window is opened and the link is not displayed.

    When I click on an active link from another application, it opens the firefox application, but won't open open the page - it just opens Firefox or takes me to Firefox. No new tab or window is opened and the link is not displayed.

    Firefox sent an email to me to confirm that I had asked the above question. The email had a link to click. When I clicked it from Firefox, nothing happened. Then I opened IE, signed into Comcast, opened the email, clicked the link, and it brought me here.

  • The Forms are not displaying correctly

    the Forms are not displaying correctly. Editing mode and printing mode are missing contents of notes/text field (Additional Notes, Background or Need, Project Summary). Second issue is when viewing/printing a Project Profile - Short Form, the text fields
    are shrink, they are not displayed full high to show all the text. It was working with IE9, IE10, but now IE10 and IE11 dont work.

    tested with Google Chrome and that seems to work the best in terms of viewing and printing the forms.
    Then you could try spoofing Google Chrome using a User-Agent string override and Document mode Edge.  Or open  IECompatData.xml  to see if you should have Compatibility View enabling Microsoft's list.  Or report your problem symptom and
    desired override here:
    http://www.modern.ie/report-compat-problem
    Ref:
    http://msdn.microsoft.com/en-us/library/gg699485(v=VS.85).aspx
    Robert Aldwinckle

  • The address for the webpage is not displaying, just "Google". How do I get the webpage address to display again?

    The bar at the top of the page does not display the webpage address anymore after I changed some setting while trying to delete a bookmark. It appears I've permanently deleted web addresses. How do I restore this setting?

    Eventually the Settings app just crashes while waiting for the Backup Options list to populate.
    When I try an actual backup of my iPad to iCloud it spins for a while and then crashes.
    I only want to backup up a handful of my apps to iCloud but right now I can't even get it to show me the list of apps to turn on/off.

  • I have Adobe Reader X. I can open a pdf on my Windows PC but the contents will not display.

    I have Adobe Reader X.  I can open a pdf on my Windows PC but the contents of the file will not display.

    Download and run the Adobe Cleaner to completely remove Reader
    Download and run the Offline Installer to reinstall

  • HT1296 when connecting my Ipad on mac mini and launching Itunes, the "INFO" is not displayed and my calendar and contacts are not synchronized

    when connecting my Ipad on mac mini and launching Itunes, the "INFO" is not displayed and my calendar and contacts are not synchronized

    Thanks for your advice. However my private informations have nothing to do on a wandering cloud that floats on high over US vales and hills ( and credit to William WORDSWORTH for his poetry)

  • In iPhoto (09) I can add a description to a photo which will display when running the slideshow, however when I sync the Album to my iPad and I run slideshow the description does not display, WHY?

    In iPhoto (09) I can add a description to a photo which will display when running the slideshow, however when I sync the Album to my iPad and I run slideshow the description does not display, WHY?

    I'd ask that on the iPad forum.

  • Problem on PC: During import, I can locate the sources folder however the photo do not display. Was working fine.

    Problem on PC: During import, I can locate the sources folder however the photo do not display. Was working fine. All file types, Lightroom is no longer recognising the images to import, The panel that usually displays them remains empty.  Try using backup versions, removing software that could conflict , still no joy, has anyone had this problem?

    Did you follow this procedure?
    Our iTunes guru Terence Devlin advises the following:
    1. Quit iTunes
    2. Drag the iTunes folder from your internal hd - located in ~/Music folder - to your external hd. DO NOT delete the original one from your internal hd... yet!
    3. When the transfer is complete, press and hold the Option(alt) key and fire up iTunes.
    4. A "Choose iTunes Library" window will come up. Click on the "Choose Library" button.
    5. Navigate to where the iTunes folder is located in the external hd.
    6. Within the iTunes folder, select the iTunes Library file and click Choose...
    That's it. iTunes will now display all your playlists, songs, movies, podcasts etc. At this point, should you wish, you can delete the iTunes folder from the internal hd to free up space.
    More info:
    http://support.apple.com/kb/HT1751
    Or if you prefer a more complicated explanation:
    http://www.ilounge.com/index.php/articles/comments/moving-your-itunes-library-to -a-new-hard-drive

  • I have yahoo mail, since your newest upgrade, when I open an email with a picture in it. The picture does not display

    I have windows7/8 and use att.yahoo mail. when I receive an email with a picture in the body, the picture does not display, this started happening after fire fox latest upgrade

    If images are missing then check that you do not block images from some domains.
    *Tap the Alt key or press F10 to show the Menu bar.
    Check the permissions for the domain in the currently selected tab in "Tools > Page Info > Permissions"
    Check "Tools > Page Info > Media" for blocked images
    *Select the first image link and use the cursor Down key to scroll through the list.
    *If an image in the list is grayed and "<i>Block Images from...</i>" has a checkmark then remove this checkmark to unblock images from this domain.
    Make sure that you do not block (third-party) images, the <b>permissions.default.image</b> pref on the <b>about:config</b> page should be 1.
    Make sure that you haven't enabled a High Contrast theme in the Windows/Mac Accessibility settings.
    Make sure that you allow pages to choose their own colors.
    *Tools > Options > Content : Fonts & Colors > Colors : [X] "Allow pages to choose their own colors, instead of my selections above"
    Note that these settings affect background images.
    See also:
    *http://kb.mozillazine.org/Website_colors_are_wrong
    There are extensions like Adblock Plus (Firefox/Tools > Add-ons > Extensions) and security software (firewall, anti-virus) that can block images and other content.
    See also:
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *http://kb.mozillazine.org/Images_or_animations_do_not_load
    *http://kb.mozillazine.org/Websites_look_wrong

  • When I excute rsplan ,but the application is not displayed correctly  why?

    when I excute rsplan ,but the application is not displayed correctly  in our explore ,who can tell me what reason? 3ks very much

    Hi,
    please take a look at the following note:
    919850 Problems with the planning modeler and the planning wizzard
    Hope this helps ...
    Matthias Nutt
    SAP Consulting Switzerland
    thanks Matthias Nutt 's reply
    thanks very much
    throuht you answer I have  kown some about this ,and now I can modling throuht URL,but still can not start rsplan in gui ,whether I must to configuration a web service ,and that you can give me something about how to step to step configuration that,
    thanks again

  • I do not manage to find the function to change a letter into exposing. I have MUSE DC 2014.2 and the menu does not display this possibility. I tried to import it IN design but that does not function either?

    I do not manage to find the function to change a letter into exposing. I have MUSE DC 2014.2 and the menu does not display this possibility. I tried to import it IN design but that does not function either?

    I'm not clear on exactly what it is you're asking, but if you're referring to changing opacity, you can change the opacity setting for the States of a menu item via the States panel and Control Strip.

  • Why the form does not display these info first...?????

    Hi ,
    In a when-new-form-instance trigger i have the following code:
    DECLARE
    W  WINDOW;
    AL NUMBER;
    BEGIN     
    :BLK_TEMPLATE_ITEMS.global_app_user_code:=:global.app_user_code;
    :BLK_TEMPLATE_ITEMS.global_role:=:global.role_onomasia;
    :BLK_TEMPLATE_ITEMS.global_username:=:global.username;
    W:=FIND_WINDOW('WINDOW1');
    SET_WINDOW_PROPERTY(W,TITLE,'TITLE');
    Read_image_file('images\Shma_Perif.gif','gif','blk_template_items.logo_forea');
    AL:=SHOW_ALERT('ALERT_INFO');
    IF AL=ALERT_BUTTON1
           THEN
       .......In the above code .... the form data values and the image are not displayed beforehand the user presses one of the button of the alert... as expected.....
    How can i impose the system to display the contents in the "BLK_TEMPLATE_ITEMS" block , the image and then the alert....????
    I tried the PAUSE built-in procedure... it works as i want... but it displays another message("Please confirm") before the alert.....
    Thanks ,
    Simon

    Did synchronize solve your issue?
    Like to know it too ;-)
    And if you put EXECUTE_QUERY just before your call to the alert?
    Erwin

  • Why the JTable do not display in the JFrame? Thanks!

    Why the JTable do not display in the JFrame?
    Thanks for your help.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class test extends JFrame implements ActionListener {
         JButton button=new JButton("Click");
         public test(){
              JFrame frame=new JFrame("abc");
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.getContentPane().add(button, BorderLayout.NORTH);
              button.addActionListener(this);
              frame.setVisible(true);
         public void actionPerformed(ActionEvent event) {
              String[] columnNames = {"First Name","Last Name","Sport","# of Years","Vegetarian"};
              Object[][] data = {{"Mary", "Campione","Snowboarding", new Integer(5), new Boolean(false)}};
              JTable table = new JTable(data, columnNames);
              table.setPreferredScrollableViewportSize(new Dimension(500, 70));
              JScrollPane scrollPane = new JScrollPane(table);
         getContentPane().add(scrollPane, BorderLayout.NORTH);
         public static void main(String args[]){
              test t=new test();
    }

    Problem solved.
    Thanks!

Maybe you are looking for

  • App Store error while checking for updates

    I noticed recently that there hasn't been any updates for OS X Mavericks so I decided to manually check for one. When I did so, I got this error while attempting to check for an update: There's not much else to explain. The only other thing that has

  • Properties Bar not active on occasion

    Occasionally I can open a pdf, either through Adobe or by double clicking the file, and the properties bar will be in active (visible but gray). When this condition occurs and I attempt to modify a property the program freezes and closes with an erro

  • BW installation error

    HIIII gurus, i got an error when installing bw  in database installation at 32 nd phase i got an error open rfc connection failed, can any one help me. Bw on windows server 2003

  • Disappearing email

    My email has been disappearing from my phone.  I verified with Att that outlook settings were correct on computer. I was advised to reconfigure email acct on phone. To soon to tell if it worked. Any other suggestions?

  • SAP implementation methology

    Dear,          In interview someone sak me about the standard methology used in sap implementation?        Can any one tell me about this ?Or any link will be help full> Regards.