Please answer quick have to deliver the project in 18 hours!!

I cant acess any method or variable from the class Projecto becouse it is static
what can i do to make it nonstatic?
this part is in Construcao() class.
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
Projecto.rectangulos[0].setVisible(true);
Projecto.desenharRectangulos();
this part is in Projecto() Class that extends to jFrame
public class Projecto extends javax.swing.JFrame implements KeyListener{
/** Creates new form Projecto */
public Projecto() {
initComponents();
inicializarGrelha();
inicializarRectangulos();
indiceRectanguloSeleccionado = 0;
desenharRectangulos();
jPanel3.setFocusable(true);
//voltar a chamar este metodo para os componentes serem re-organizados
//na frame
pack();
public void inicializarRectangulos() {
rectangulos = new Rectangulo[4];
rectangulos[0] = new Rectangulo(5,5,10,1);
rectangulos[1] = new Rectangulo(0,15,10,20);
rectangulos[1].setCor(Color.PINK);
rectangulos[2] = new Rectangulo(35,30,5,5);
rectangulos[2].setCor(Color.BLUE);
rectangulos[3] = new Rectangulo(30,0,15,5);
rectangulos[3].setCor(Color.RED);
protected void desenharRectangulos() {
//existem varias maneiras de fazer isto. Esta não será a mais eficiente
//mas é a mais facil de perceber e codificar
for(int y=0; y<altura; y++) {
for(int x=0; x<largura; x++) {
celulas[x][y].setBackground(Color.WHITE); //limpar cor
//percorrer rectangulos e verificar se algum esta neste ponto
//como nao permitimos colisoes, so vai ser verdade para um
celulas[0][y].setBackground(Color.BLACK);
celulas[x][0].setBackground(Color.BLACK);
celulas[59][y].setBackground(Color.BLACK);
celulas[x][39].setBackground(Color.BLACK);
for(int i=0; i<rectangulos.length; i++) {
if(rectangulos.isVisible())
if( rectangulos[i].ocupaPonto(x, y)) {
celulas[x][y].setBackground(rectangulos[i].getCor() );
break;

Not sure what you are trying to do. Where is rectangulos declared? It looks like you are trying to access a variable (in which case whether it is static or not is not the issue, but it's access level such as public, protected, private, etc.) However, this is bad practice. Always make your variables private and provide methods (whether static or nonstatic) to access them. The principle is called encapsulation.
- Saish

Similar Messages

  • I have a few wedding projects(1-2 hours)I am trying to export at full hd quality,than burn in idvd.After rendering for 8hrs I receive error code that states "file is too big". Please help? compressing tips without losing quality?

    I have a few wedding projects(1-2 hours)I am trying to export at full hd quality,than burn in idvd. After rendering for 8hrs I receive error code that states "file is too big". Please help? compressing tips without losing quality? or any other exporting alternatives?

    Hey Z,
    Thank you for the tip on exporting by media browser (large) from imovie. But of course, if it's not one thing it's another. Now that I figured how to export a large file from imovie, I have an idvd issue. I followed the instructions for burning from idvd and changing the encoding to professional quality and the burn speed to x4, but I am receiving an error that states the following,
    Your project exceeds the maximum content duration. To burn your DVD, change the encoder setting in the Project Info window.
    Project:
    - total project duration: 79:04 minutes
    - total project capacity: 4.327 GB (max. available: 4.172 GB)
    Menus:
    - number of menus in project: 1 menus
    - total menu duration: 0:39 minutes
    - total menu capacity: 37.370 MB
    Movies:
    - total movies duration: 78:25 minutes
    - total movies capacity: 4.291 GB
    I have searched in the idvd forum for similar issues and I am stumped at this point. I have tried deleting the encoding assets and re launching idvd with the changed preferences, and still the same error. I know you mentioned something about free hard drive space available, and I have very little left. 4GB to be exact due to massive hours of non-edited footage. I am not sure if this is why, but I do not recall ever needing free space to burn memory onto a separate dvd. I would be more than happy if I am wrong, and it would be a quick fix. Otherwise, the technical nightmare continues. It's all a learning process and your expertise is greatly appreciated! Thanks in advance.

  • My youtube does not work on safari only when i try to play a video it says "This video is not available on mobile add to playlist" But i am using a mac air 11 inch it is not a mobile. Please Help. i have to use the youtube on firefox or chrome

    my youtube does not work on safari only when i try to play a video it says "This video is not available on mobile add to playlist" But i am using a mac air 11 inch it is not a mobile. Please Help. i have to use the youtube on firefox or chrome. At times it also say QuickTime Player can't open "video.3gp". and
    The file may be damaged or may not be a movie file that is compatible with QuickTime Player. when i try to open a video on youtube on safari

    I too am having the same issue as the OP.
    Your USER AGENT information is Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/600.3.18 (KHTML, like Gecko) Version/8.0.3 Safari/600.3.18
    Every webserver that receives a request from your browser is able to determine the HTTP USER AGENT information unless it has been removed by some software (e.g. firewall) before the request was trasmitted.

  • HT1529 Where do i find the serial No on a IMac 4.1 please? I have looked on the "about this Mac" but it does not have the serial No on it!

    Where do i find the serial No on a IMac 4.1 please? I have looked on the "about this Mac" but it does not have the serial No on it!

    Until last July, the model identifier on every Intel Mac would tell you exact minimum and maximum expansion in terms of RAM, retail operating system, and any system specific required firmware updates, video and audio expansion capabilities, and patches for Wifi available.  The serial number is only of consequence if you wish to date a Mac down to the week.  This can help in determining system specific disks, available warranty, and exchange/repair program eligibility.  Outside of that the year and month can usually be narrowed down to a six month period with model identifier alone on all except MacPros.  So my question is, is it really that relevant for your needs?

  • I forgot my sercutity questions answers and have not received the email with instructions.

    I Have forgotten my sercutity question answers and have not received the email with instructions. 

    Unless it’s in a spam filter, you need to ask Apple to reset your security questions. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to call, fill out and submit this form.
    (121954)

  • Please answer once and for all the boot green screen

    I have searched everywhere for an answer since my issue.
    Relevant info:
    iPhone 3GS.
    iTunes version 10.7.0.21 (2012-09-12).
    Doesn't matter what system I have since this is related to an iPhone device.
    Fully charged battery before proceeding with the update.
    Updated the iOS 5.1.1 of the iPhone to iOS 6.0 through required update recommendation of iTunes.
    Never been abused, jailbroken, serviced or dropped. (never had issues until the update)
    Once completed the updated process of iTunes and iPhone was done with the internal installation, the iPhone rebooted with a green screen/hue and the apple logo was still original color "silver". It loaded up to the iPhone Configure screen still with green color screen/hue.
    I pressed on the power button for 5 seconds and slide "slide to power off" and the iPhone turned off. I waited about 15 seconds and pressed on the power button to turn the iPhone back on, hoping no more green screen/hue and the apple logo was still original color "silver" but returned to the original green screen/hue and the apple logo was still original color "silver".
    Failed!
    It still showed green screen/hue and the apple logo was still original color "silver" and booted to the iPhone Configure screen still with green color screen/hue.
    Remedies tried after searching the internet:
    Hard Restart/Reset.
    DFU Mode. (even tried a restore process with iTunes again *so much time wasted to obtain the iOS download again*
    Recovery Mode (even tried a restore process with iTunes again *so much time wasted to obtain the iOS download again*
    Recovery from Backup is denied because previous version was iOS 5.1.1 and iTunes refuses the process so (even tried a restore process with iTunes again *so much time wasted to obtain the iOS download again*
    Left the iPhone at the Configure screen until battery drained and then plugged it back into the USB port of system until it charged long enough for the iPhone to boot yet again green screen/hue and the apple logo was still original color "silver". It booted to the iPhone Configure screen which is still the green screen/hue and I left it charging until battery icon top right showed full.
    Now, can someone give a straight answer while staying on this topic about this issue, please?
    *I can understand if the apple logo was green then it could be a screen issue but it is not the case.
    All help is greatly appreciated even if you took the time to read all of this but did not answer.
    Thank you!

    halodev:
    I made a CF/Flex site based on the Flexstore sample app,
    using a database instead of XML as the data source; in case you
    want to see it:
    http://www.timos.com/dg/flex/DilemmaGames.html
    At first I had troubles similar to what you describe;
    initially, part of the problem was that my hosting company had not
    yet upgraded to CF 7.02. One other thing I had to correct: when you
    upload to your server, upload the entire ‘bin’ (or
    whatever your output folder is) minus the debug SWF.
    If it would help with other issues, contact me and I will be
    glad to make my project code available to you. Good luck.
    Carlos
    [email protected]

  • Where we can check the changes that we have done in the Projects

    Dear Friends,
    I have done few changes in the project WBS element after saving the Project, Now I want to check what all the changes that I have done in the WBS.
    In which transaction I can check these changes apart from u201CCN60u201D, and please explain step by step what all the customizing setting are required to check these changes.
    In Projects is it possible to check the way we are checking the changes in PO and Sales Orders.
    Regards,
    Sai

    Nitin Patoliya,
    Thanks for the inputs, I have tried as you suggested there it is showing system status Created and released, but Iu2019m not getting the information as I required. Here exactly what Iu2019m looking is If I have done any changes in the Project, Eg: after saving the Project if I have changed the Business area, profit center u2026.etc, I need the information when I have changed this data and at what level (WBS, Network or Activity).
    Regards,
    Sai

  • "Strange Situation" error in AE CC 2014 (Just upgraded) caused me to lose an entire day of effects work. Very angry, and I want answers. Have to deliver tomorrow. (Error 939524096)

    Here is my file. Seems to be corrupted. No Auto Save was made eventhough AE is configured to save one. Seemed to happen in the middle of things, while I was switching between Premiere CC 2014 and After Effects CC 2014 (Dynamic Linking). Was working perfectly fine until randomly the program crashed and Dynamic Link in Premiere lost access to the upwards of FIFTY COMPOSITIONS I had worked on.
    http://s000.tinyupload.com/index.php?file_id=21188265255943283011

    I don't mean to be cruel here, but you lost a client because you didn't have a efficient and safe workflow set up. I never do anything without saving files in versions about every 10 to 20 minutes. If your files are getting corrupted every time you save them then you got to analyze your project and figure out what you are doing that is causing the corruption. Work for 10 or 15 minutes, save the file, open the file, save it as a different version then start again when you're having problems. Here's the most important part of business advice I can give you. As soon as you have any indication that there may be something wrong, contact your client. Don't make excuses, don't blame the software, take full responsibility and just explain that you need more time or something in the project needs to change. I have never had a client refuse to give me some leeway or refuse to make adjustments to the project that would allow it to be completed on time.

  • [CLD] When do you have to copy the project to disk

    As I am in the last 10 days before I take my first CLD Exam I was wondering if anyone knows when you have to copy the Exam project to disk?  I am hoping it could be when the proctor says time up.  
    LeMur Technology Services, LLC
    President
    [email protected]
    Toll Free: 877-761-2916
    Cell: 609-577-2628
    Fax: 215-862-9816

    This is pure hearsay since it has been a long time since I took the CLD.  But I'm pretty sure they do not consider the copying of the files as part of the exam.  So it is done once time is up.  That's how it went for me.  Last I heard, it is still that way.
    The CLD is not exactly easy, but it is not nearly as bad as a lot of people make it out to me.  Even my boss passed and he didn't even finish.  A good friend of mine passed even though he hadn't even touched LabVIEW for at least a year (I mentored him A LOT during the previous year).
    If you are worried about losing time due to copying of files, then I'd say you need to practice more.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions

  • Please Answer some question..For the warranty

    I am planning to buy new mac book pro 13inch.
    But I was worrying if I buy an extra HDD and replace it into my New macbook pro by myself.
    Will it void my MBP whole warranty?
    I have no idea and found no answer on whole supporting page, so ask it here.
    If any disturbing here, sorry for ALL.

    Leo628 wrote:
    But I have one more question.
    Does the original RAM and HDD have warranty with the MBP(1yr) and Apple Care(3yr)?
    Yes, whatever RAM and HD shipped with the MBP is covered under the 1/3 year warranty, as long as nothing you do harms it.
    If not, I can trade it to replace 4GB ram ^^
    If, by "trade," you mean get rid of it, I would not do that. If you ever have to have your MBP repaired under warranty, and new RAM is installed, you may have a problem with Apple or an AASP. Prior to having it serviced, I would put the original RAM back in.

  • I downloaded something and now when I click on safari yahoo comes up instead of top sites and I really want top sites back it's easier and google as the search engine on the top bar helped a lot too!! Please answer quick need immediate HELP!!

    I Downloaded something onto my computer and now when I click onto safari yahoo pops up instead of top sites I know certain changes come along with downloading but if there is a way back to top sites and google as my search engine I need it!! I'm not one for change and I love the whole original display that the macs have to offer when you first get your mac so thats why I really want top sites back also it was great when your in and rush and so much easier!! Please HELP immediately this is urgent!!

    Identify and remove adware
    http://www.thesafemac.com/arg/
    or use Adware Removal Tool.
    http://www.thesafemac.com/art/

  • How do you change the tempo after you have already openned the project

    Is there a way to change the tempo? I know you can set it as you create the new project, but once you have created it, can you change the tempo, particularly on the metronome? And is there a way to hear it without hitting record?

    on the left side of the numerical display click and select "project", then click on the tempo to adjust it.
    the metronome can only sound during record and playback (if selected to in prefs)

  • Problems installing update 11.1.4 please help I have tried all the fixes that other users have suggested with no joy

    Hi I am having problems with the latest update (11.1.4), I have unistalled and reinstalled that many times now I have lost count, I have also tried all the fixes that other users have suggested with no joy.
    What is this msvcr80.dll file that is missing, also after unistalling and rebooting computer I get another message that states icudt49.dll is missing. 
    Please help

    Oh, and I checked here http://support.apple.com/kb/HT3939 and you are correct!
    I do have an iPhone 3G not a 3GS.
    So does that mean that I cannot get any later software than iOS 4.2?

  • Could u please answer my question for filling the setup tables in SAP ECC purchasing the following error encountered..

    Enter rate  / USD rate type M for 00.00.0000 in the system settings
    Message no. SG105
    Diagnosis
    For the conversion of an amount into another currency, an entry is missing in the currency conversion table.
    Procedure
    Add the missing entry in the currency conversion table.
    Execute function
    You can then continue to process the commercial transaction

    Hi karim,
    While posting thread here, please use proper headline instead of general sentence.
    Issue: seems like some exchange rates issue at ecc side.
    Seek your FI or functional team to maintain proper USD exchange rates/rate type For M.
    Later you can try to fill set up tables.
    Once FI team done exchange rates at ecc side, do transfer global setting to bw side.
    Thanks

  • I have recently purchased one of your products Order number AD014142539(2). Please let me have a refund The product did not work for me.

    how do I get my refund?

    Hi,
    I have cancelled your subscription for the order no.AD014142539.
    You will get the refund in 7 business days.
    Regards,
    Florence

Maybe you are looking for

  • How to create the report in given format???

    Hi there, My table view gets the report in this format. Unit -----Report-----Sum u1----------A---------s1 u1----------B---------s2 u2----------A---------s3 u2----------B---------s4 U3----------A---------s5 U3----------B---------s6 I need report in th

  • How to produce a progressively encoded PAL DVD?

    I've been tearing my hair out trying to get a conclusive answer to this. I'm trying to learn how to produce a PAL DVD that is encoded "progressively" and is not interlaced. First I posted about it here in the Compressor forum, and then over at Ken St

  • Customization of New Portal Desktop Framework

    Hi All,       My requirement is customization of Default Framework Page based on client specifications and i need to assign that new Desktop Framework page to only end users not for all the users. The Below steps i did, I copied the default framework

  • Mail icon question

    On the main mail window, opposit the sent mail line for a specific account, there is a triangle with an exclamation mark inside. I can guess that this means there is something wrong with the SMTP server used for that account.  But when I run the Conn

  • Swf not working when moved to other folder....

    Hi all... i have created a simple flex project that does not use any server technology...  i have then used acitonscript to dynamically set up my end points and channels for a simple remote object which calls a java class on a tomcat local server. al