How to handle this error!(please help)

hey !
i am getting this error massege(cannot resolve the symbol(setBorder).i am really confused .
please somebody help me!
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
import java.text.SimpleDateFormat;
//import javax.swing.border.CompoundBorder;
class MyPanel extends Grid
public MyPanel()
public MyPanel(String title)
setBorder(BorderFactory.createCompoundBorder(
BorderFactory.createTitledBorder(title),
BorderFactory.createEmptyBorder(5,5,5,5)));
public class Grid extends JFrame /*implements ActionListener*/
static final int FPS_INIT = 15; //initial frames per second
static final int FPS_INIT2=2000;
//THIS LINE
//static final double FPS_INIT3=Aug;
int intframeNumber = 0;
int delay;
boolean frozen = false;
private JPanel date_panel,year_panel, month_panel,day_panel;
private String time=new String("");
private Date date=new Date();
public Grid() {
time=time + new Date().toString();
SimpleDateFormat formatter = new SimpleDateFormat("E, MMMM d, yyyy") ;
time = formatter.format(date) ;
date_panel=new JPanel();
year_panel=new JPanel();
month_panel=new JPanel();
day_panel=new JPanel();
JSlider framesPerSecond = new JSlider(JSlider.HORIZONTAL,
1, 31, FPS_INIT);
JSlider framesPerSecond2 = new JSlider(JSlider.HORIZONTAL,
1990, 2010, FPS_INIT2);
//THIS LINE
// JSlider framesPerSecond3 = new JSlider(JSlider.HORIZONTAL,
// Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec, FPS_INIT3);
date_panel.setLayout(new FlowLayout());
date_panel.add(new JLabel(time));
day_panel.setLayout(new FlowLayout());
day_panel.add(framesPerSecond);
//year_panel.setLayout(new FlowLayout());
MyPanel year_panel = new MyPanel("Year");
year_panel.setLayout(new BorderLayout());
month_panel.setLayout(new FlowLayout());
// month_panel.add(framesPerSecond3);
// JSlider framesPerSecond = new JSlider(JSlider.HORIZONTAL,
// 0, 31, FPS_INIT);
// framesPerSecond.addChangeListener(new SliderListener());
//Turn on labels at major tick marks.
framesPerSecond.setMajorTickSpacing(5);
framesPerSecond.setMinorTickSpacing(1);
framesPerSecond.setPaintTicks(true);
framesPerSecond.setPaintLabels(true);
framesPerSecond.setBorder(
BorderFactory.createEmptyBorder(0,0,10,0));
framesPerSecond2.setMajorTickSpacing(5);
framesPerSecond2.setMinorTickSpacing(1);
framesPerSecond2.setPaintTicks(true);
framesPerSecond2.setPaintLabels(true);
framesPerSecond2.setBorder(
BorderFactory.createEmptyBorder(0,0,10,0));
year_panel.add(framesPerSecond2);
/* framesPerSecond3.setMajorTickSpacing(2);
framesPerSecond3.setMinorTickSpacing(1);
framesPerSecond3.setPaintTicks(true);
framesPerSecond3.setPaintLabels(true);
framesPerSecond3.setBorder(
BorderFactory.createEmptyBorder(0,0,10,0));*/
//JPanel contentPane = new JPanel();
//Create the label for the animation.
// picture = new JLabel(new ImageIcon("images/doggy/T"
// + frameNumber
// + ".gif"),
// JLabel.CENTER);
Container contentPane = getContentPane();
contentPane.setLayout(new GridLayout(4,4));
contentPane.add(date_panel);
contentPane.add(year_panel);
contentPane.add(day_panel);
// contentPane.add(month_panel);
public static void main(String args[]) {
Grid gw = new Grid();
gw.setTitle("Date Slider");
gw.setSize(400,200);
gw.setVisible(true);

you have to set the border for ur component, u can not call set border on the air..........
i have changed your code like this
     year_panel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(title),BorderFactory.createEmptyBorder(5,5,5,5)));
and
                              public JPanel date_panel,year_panel, month_panel,day_panel;
instead of private i have used public.It is compiling.

Similar Messages

  • I can't forcequit firefox and shutdown my computer, nor can I open up any other programs or applications. Does anyone know how to fix this? please help this poor soul.

    I can't forcequit firefox and shutdown my computer, nor can I open up any other programs or applications. Does anyone know how to fix this? please help this poor soul.

    You can force quit applications
    >Force quit
    if that does not work you can force quit a computer shut down by hold the power button for an extended period.

  • After upgrading my iPhone 5 to iOS 7 iTunes will not stay open once the app launches...does anyone know how to fix this? Please Help :)

    After upgrading my iPhone 5 to iOS 7 iTunes will not stay open once the app launches...does anyone know how to fix this? Please Help :)

    I have exactly the same problem. I too have tried everything that's been suggested, but still not working. Don't really what to do next? I have an iPhone 4S.

  • I can not connect my i phon with my pc it shows athorised computer when i am trying to do authorised process the process done but again i connect my phon again show this errore please help me to solve my prob....

    i can not connect my i phon with my pc it shows athorised computer when i am trying to do authorised process the process done but again i connect my phon again show this errore please help me to solve my prob....

    I have clicked on the  connect button, but it brings up the same There is a problem connecting,  and I have also tried SMB://
    i tried pinging the ip address with in termial and it times out.  
    From my windows PC and I can access my MacBook Air just fine,

  • Can Any one tell me. System considering the Sales District also in Delivery Split which is not in standard. How to resolve this. Please help me

       Hi
    Can Any one tell me. System considering the Sales District also in Delivery Split which is not in standard. How to resolve this. Please help me

    Dear Srikanth,
    I am not sure, if my answer will satisfy you, but anyway I will try:
    Field Sales District is technically called BZIRK. In delivery structure is this field located in header (table LIKP), what cause split, if origin document (Sales Order) has different Sales District in some positions. This is standard program behavior. Basically it shouldn't happen, as value is taken from customer master (Sold-to Party) and copied to header and items of sales document. But user can manually changer for particular items.
    Well, to solve situation you have few ways:
    1. Do not allow users to change value on items - can be managed by organizational decision or by authorization concept.
    2. If there is a reason to have different Sales District in items, then it can be managed in in routines for copy control between sales and delivery documents (delete value of BZIRK for all items for instance). But then will be this information lost for further usage. It seems to me to invoice is value copied directly from sales order (field VBRP-BZIRK_AUFT) then it mustn't be a critical for analyses.
    3. Your situation also can happen if you wants to collect more sales documents to one delivery. In this case can be that Sales District is different for same customer in different sales order (even seems to be little bit strange). Then solution from point 2 can help as well, I believe.
    Best Regards
    Arnost

  • TS1424 Hi how can i resolve error code 1009 ,when i want download from iTunes i receive this error please help me.    Banafsheh

    Hi
    Please help me on error code 1009

    They are free but iTune still checks your payment method but realyydoes not charge anything.  Yo can set up a new/special iTunes account that is only good fro free apps.  However, you will still need our original ID to update any apps thatyour purchased with that account.
    Create an iTunes App Store account without a credit card

  • I'm not sure how to explain this but PLEASE HELP! ...

    okay so I'm not quite sure if anyone is going to understand what I'm talking about...
    But for some reason when someone adds me to skype (sends me a request) it says "Hi, White Asian!... so and so wants to add you.. blahblah etc." It says something other than my current user name, or my current display name, or my first and last name. I have know idea why it says this. I've had skype for a long time now and several years ago I believe that I changed my display name to "White Asian" as a joke. It hasn't been that for a long time now and I have no idea why it shows up like that when someone sends me a request on skype. I've tried changing every possible thing to do with a name in the profile/user settings to no avail. THe only time it shows up (that I'm aware of) is when someone adds me.
    So if you have any idea how I can fix this or why it's happening please let me know immediately!
    Its driving me mad because I don't know how to fix this!
    Thanks!
    Attachments:
    Untitled.png ‏11 KB

    Try this website. Yes its sprint but it might help you. http://support.sprint.com/support/article/Troubleshoot_issues_related_to_your_Sa msung_Galaxy_S_II_not_turning_on_completely/WTroubleshootingGuide_542_GKB51165-T rend?INTNAV=SU:DP:OV:TSIS:SamsungGalaxySIi-AsYouGo:TroubleshootIssuesRelatedToYo urSamsungG

  • How to implement this? please help

    In my java class, I have a string array called strarray which hold serveral elements, some of the elements have the same value , for example, the first element is "swimming", the forth element is also swimming. I use a for loop to get each element and give it to arrayHolder which is also a array with the same size as strarray. Now, what I want is: I defined a Vector called element I want this vector to filter out the element from arrayHolder, get the name of non-duplicated name from the arrayHolder, the result should be inside the element vector (swimming,walking,running,dancing), no duplicated name. My code is like follows:
    import java.util.*;
    import java.io.*;
    public class arrayTest{
    public static void main(String arg[]){
    String[] strarray={"swimming","running","walking","swimming","dancing","running"};
    String[] arrayHolder=new String[strarray.size];
    Vector element=new Vector();
    for(int i=0;i<strarray.length();i++){
    arrayHolder[  i  ]=strarray[  i  ];
    /* What should I do next to get the non-duplicated element from arrayHolder and
    * add them into the element vector????
    I did not finnish it, since I am a little bit confused, how to implement? Need some help. thanks.
    Message was edited by:
    Mellon

    Not sure if I see the use of strArray & arrayHolder (I've not looked at your code - you might use code tags next time (check the "code" button above the message textarea), but may I suggest using a Map of some sort instead of a Vector? It will prevent duplicates for you.
    Good Luck
    lee

  • Stuck on this error, please help.

    Hi, I'm fairly new to Java, and I am getting this error on this library program I'm working on.
    "Can't make a static reference to nonstatic variable `Collection' in class `library'."
    Mainly, I would just like to find out what the error means by "make a static reference to a nonstatic variable", if you need more info, just tell me and I'll post it up.
    Thanks in advance.

    you can't access a non-static variable in a static method...for example...
    private int time;
    public int getTime() //this is legal
         return time;
    public static int whatIsTheTime() //this is not legal
         return time;
    [\code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • TS3694 phone is given this error please help i cant do anything

    help error 3194

    Error 1004, 1013, 1638, 3194: These errors may be the result of the connection to gs.apple.com being  redirected or blocked. Follow these steps to resolve these errors:
    Install the latest version of iTunes.
    Check  security software. Ensure that communication to gs.apple.com is  allowed. Follow this article for assistance with security software. iTunes for Windows: Troubleshooting security software issues.
    Check the hosts file. The restore will fail if there is an active entry to redirect gs.apple.com. FollowiTunes: Advanced iTunes Store troubleshooting to edit the hosts file or revert to a default hosts file. See section  "Blocked by configuration: (Mac OS X/Windows) > Rebuild network  information".
    Try to restore from another known-good computer and network.
    If the errors persist on another computer, the device may need service.

  • HT1926 GOT THIS ERROR, Please help...

    there is a problem with this windows installer package a program required for this install to complete could not be run contact your support personnel or package vendor
    i was trying to update itunes and i kept getting this error

    Try the following user tip:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • I bought a 2nd gen ipod touch without software over the internet, i cannot use any apps as i need the latest version of iOS and i don't know how to get this. Please help.

    please help

    decy95 wrote:
    When I clicked 'check for update' it just says that 2.2.1 is the current version
    It will - until you purchase iOS 3.
    Follow the link that stedman provided, and on that page, instead of choosing the link to iOS4, choose Purchase the iOS 3.1 Software Update directly from the iTunes Store. When you choose it, iTunes will open to the store and page for buying (purchasing) the update. It doesn't cost much (a few dollars although I cannot recall precisely) and it is the only way to update from you current iOS version. Once you do that, a further update to iOS 4.2.1 is free. That particular update may occur straight away, I don't know.
    By the way, iOS 4.2.1 is as high as the 2nd generation Touch can go, but don't let that put you off. I have one and although I cannot install the BBC iPlayer (because it requires iOS 5) there are many Apps that work perfectly well with iOS 4.2.1.
    decy95:
    I've just read the another discussion (to which you contributed), in which Illaass suggests that you may have a 1st generation Touch. If that is so, then your iPod will only be able to update to iOS 3.1.3. This will still need to be purchased, but be aware that many Apps require iOS 4 or higher, so your options would be more limited. So follow the link Illaass provided to confirm which model you have.
    Message was edited by: the fiend

  • While running web app I got this error please help.

    The JRE was not found in directory C:\Oracle\MIDDLE~1\jdk160_29. (JAVA_HOME)
    Please edit your environment and set the JAVA_HOME
    variable to point to the root directory of your Java installation.

    Can you set the OS Environment Variable JAVA_HOME to point to the jdk home and check if the issue still occurs?
    Thanks,
    Vijaya

  • TS3367 I'm having trouble making Facetime calls with my iphone 4s.  I can receive them; however, I can not make them.  Any ideas of how to fix this? PLEASE HELP!!!  Thank you!

    I am having a problem making phone calls using Facetime.  I was able to use it on two separate occassions; however, now I can not.  I can receive calls, but can not make them.  Not sure what to do.  Any ideas?  Any help would be greatly appreciated.
    Thank you VERY much!

    There are a lot of posts in the forums today with people having problems with iMessage.   There was also a published outage yesterday, so it's possible there are still some issues that may be impacting you both.
    I would just wait it out - I'm sure it will be sorted out soon.

  • HOw To Do This Idea :: Please Help

    Hello all folks .. i create employees table .. contain Name n Job n salary n Hiredate
    and i design the form like module the thing i want that when i insert new employees data that is similer to other i intserted before it came out as a pop menu so i can choose it so example if i insert in the Name: jean and save it then i type in the name item the j character it show me that there was jean inserted befor n so on i can choose it if it was what i want to insrt .. hope u got the idea n need the answer ......... thnx fellas

    Maybe populate some record groups with data when inserting? when doing a new insert, search in the record group after e.g. 'J' and display the result...
    regards
    Christian

Maybe you are looking for

  • Blue-ray player

    hi.. I cant get a blue-ray movie to play or load on this laptop..it says that I do have blueray. it worked before and now it doesnt.. could you  help me?

  • Proper layout on multiple screen sizes

    I have an app created at iPhone4 screen res (640x960) Now I want it to scale properly on an android tablet (800x1200). this looks good stage.scaleMode = StageScaleMode.NO_BORDER; But how to I query the size for my buttons? I use the capabilities clas

  • Incase of emergency contacts

    Hello and good morning , I am a new Iphone user , been on the Android platform for many years and i see something that appears to be lacking on the Iphone , my last two droids had an I.C.E. contact list , In case of emergency contacts , if something

  • Network location wrongly identified behind router RRAS

    Hello, We are having problems setting up a RRAS server Windows Server 2008 R2 (SBS 2011) The server is configured with 2 NICs, and is running behind a router. It involves a shared building with different small companies, where the internet connection

  • Want to replace my HP laptop HDD...help !!

    hello... i have Hp 2000-2202 tu series Notebook. I am at a fix as to compatibility of the present HDD with the following Hdds :- 1)WD Scorpio Blue 500 GB Laptop internal hard drive (WD5000LPVT) SATA 3.0 Gbps Interface 8 MB Cache Memory 5400 RPM Spin