Enlarge the view automaticly

Hey,
I'm making a checkers game and I'm trying to make my checkersboard bigger when I enlarge my window.
This works for my pieces but I don't get my checkersboard to enlarge and appear.
I'm trying to work with MVC.
I think my problem will be found in the view class but I ain't sure.
My view class:
import java.awt.*;
* Write a description of class DambordView here.
* @author Potargent Bert
* @version
public class DambordView extends Canvas
// instance variables - replace the example below with your own
private Dambord bord;
protected Image buffer;
int b = getWidth();
int h = getHeight();
int y = 0;
* Constructor for objects of class DambordView
* We hebben altijd een model nodig om te tekenen.
public DambordView(Dambord b)
// initialise instance variables
bord = b;
* De tekenmethode van het DambordView
public void paint(Graphics g)
b = getWidth();
h = getHeight();
g.drawRect(20,20,b-40,h-60);
b = (b-40)/10;
h = (h-40)/10;
g.setColor(Color.BLACK);
for (int rij = 1; rij < 11; rij++)
{if (rij%2 != 0)
                for (int x=0; x<5; x++)
                    g.setColor(Color.GRAY);
                    g.fillRect(20+2*x*b+b, 20+y, b, h);
else
for (int x=0; x<5; x++)
g.setColor(Color.GRAY);
g.fillRect(20+2*x*b, 20+y, b, h);
y=y+50;
for (int i=0; i< bord.aantalPionen(); i++) {
tekenPion(g, bord.getPion(i), Color.BLACK, b);
public void tekenPion(Graphics g, Pion x, Color kleur , int straal)
g.setColor(kleur);
straal = straal-10;
g.fillArc(20+x.getX(), 20+x.getY(), straal, straal, 0, 360);
Greets,
Bert600

Bert600 wrote:
I used awt because we use it all the time in school.
I could have used swing of course but I'm not so familiar with java.If you are just learning java for school, then this is fine. . If you see yourself having any type of future with Java, then I suggest that you learn a bit of Swing on your own. It's quite a bit more flexible and powerful than AWT.
Thanks for your respons.You're welcome.
and thanks Darryl. Time to spend some yummy Duke's dollars

Similar Messages

  • HT2500 The message section of my Mail is very tiny to read as I type my messages.  How do I enlarge the viewing size of my window?

    The message section of my Mail is very tiny to read as I type my messages.  How do I enlarge the viewing size of my window?
    I am referring to outgoing new messages that I am typing.

    Can you drag the bottom right corner? You can in Snow Leopard, and I imagine you can in Lion.

  • When I open Safari, I always type command-plus to enlarge the view.  However, I can't figure out how to permanently set the Safari screen to this view setting in the preferences.  Any ideas?

    When I open Safari, I always type command-plus to enlarge the view.  However, I can't figure out how to permanently set the Safari screen to this view setting in the preferences.  Any ideas?

    Sorry, but you must Command + for every page. It's not permanent.
    If you haven't tried yet, check out Zoom in Safari > Preferences > Accessibility

  • My iphone 4 is stuck in super large screen view. tried rebooting, syncing, restore, shutting down etc. my grandson 'enlarged' the view more than is normally possible. Help please!

    My iphone 4 is stuck in super large screen view. tried rebooting, syncing, restore, shutting down etc. my grandson 'enlarged' the view more than is normally possible. Help please!

    Thank you for the prompt and correct reply, I'm now back in the land of the living and will now cancel my genius bar reservation at my local Apple store. Thanks again R.

  • Enlarging the viewer/window for videos

    When I try to view an older (non-HD) video in Aperture the viewing window is very small (1 inch by 1 inch in some cases where it was 160X120).  In iPhoto I simply was able to drag the window to make it larger.  That doesn't seem to work here.  Full screen mode doesn't alter the size either.  In fact, nothing I do seems to change the viewing size.  I tried zoom under the window menu and the view menu each without success.  Any suggestions?

    I do not know of any way to zoom the video viewer, other than using Quicktime as an external editor, but you can view your videos enlarged in Aperture, if you add them to a slideshow and then present the slideshow  in full screen mode or enlarge the viewer in the slideshow. The video will always be shown large enough to fill the viewer in the slideshow, even if it will be blown up too much,  like this:
    Regards
    Léonie

  • How to load a curve and the view automatically in diadem from labview ?

    Hello,
    I want to automate a system for processing and analyzing data and for that I am using labview.
    I recently discovered software diadem and already I am able to send data from labview.
     I would now like to obtain a curve directly in the "view" is that possible?

    Hello Beneuss,
    You can create a layout template in VIEW, save it to disk and then load it when DIAdem is started. These two lines will automatically load a VIEW layout called "Example" and display the VIEW window.
    Call View.LoadLayout("Example.tdv")
    Call WndShow("VIEW")
    To automatically have a curve show up in VIEW, make sure that you assign the correct curves in the VIEW layout before you save the layout. This is done with the drag&drop functionality from the DataPortal. Just assign the channel you wish to see, and then save the layout. It will "remember" all the channel assignments and automatically show all the channels you had assigned, as long as you don't change the channel names.
    Please let me know if that helps and if there is anything else we can help you with.
         Otmar
    Otmar D. Foehner
    Business Development Manager
    DIAdem and Test Data Management
    National Instruments
    Austin, TX - USA
    "For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary."

  • When on a Web site when I try to enlarge the view of an item or try to upload a picture on E-Bay I keep getting a blank screen.

    While shopping on different sites when I try to view an item with enlarge or view here a screen appears as if to show the item, but the block is blank. Or when the site says click here to enlarge Tried to sell on E-bay and it did the same thing when I tried to upload the picture of the article I wanted to sell.

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]

  • How does one enlarge the view of a small photo?

    Sometimes I just need to quickly retouch a small, non-pro photo, but the photo's only displayed at its original size. Sometimes I just want to enlarge it temporarly, while performing the retouch.
    I realize the enlarged photo won't be sharp, etc -- but it's not permanent; it's just so I can hone in on an element in the photo. I thought I could use the standard, Mac-keyboard shortcuts (⌘+ and ⌘-) to adjust the display of a small photo, but so far, there seeems to be absolutely no way to do this. If the photo is small, it stays that way, no matter what.
    Am I missing something?

    Thanks, SierraDragon, for the suggestion. It was a good suggestion, and it worked, but it wasn't easy.... (No reflection upon you, but upon the nature of Aperture.)
    I created a light table, then it took me 3 or 4 minutes to figure out how to get a photo to display on the light table. After dragging one to the light table icon on the left, I saw it in a list at the bottom, but it was unclear how to get it to display. Eventually I figured out that I had to drag it yet a 3rd time, from that list to the actual table.
    After that, I was further confused by the fact that I'd moved the zoom slider (on the light table) all the way to the right, but the photo was still not being displayed above 100%. Finally, it occurred to me to drag one of the "handles" at the corner of the photo and drag to enlarge it.
    So that's a total of 6, separate steps -- including the creation of a "light table" -- just to get a small photo into Aperture and to zoom in upon it. Unreal.
    I still don't understand why a photo from the desktop can't simply be dropped over Aperture's dock icon. Just getting photos into Aperture is complicated.
    I'm a huge Apple fan and supporter, but this has to be the most unintuitive application they've ever released. I wonder if Aperture was originally developed by, then purchased from, another company (just as Logic was, which explains why Logic is so convoluted, as well).
    I bought Aperture because I thought it would be like "iPhoto Pro." But it's really a different beast, all together. I love the advanced editing features, but Aperture's too convoluted for me to abandon iPhoto. I find I don't like launching Aperture, because it's too difficult to accomplish simple tasks in Aperture.
    I've submitted this issue, among others, as feedback. But I fear that there aren't enough Aperture users submitting these issues for them to be deemed important.
    Thanks again.

  • Clicking on another app I get the video automatically returning to normal screen view

    I wonder why, if I put a youtube video in full screen and I click on another app WHILE THE VIDEO IS PLAYING all remain this way. On the contrary, if I first stop the video, clicking on another app I get the video automatically returning to normal screen view... This is very annoying. Is it possible to avoid this?
    Thanks

    Sorry, Mozilla doesn't support the patent-encumbered and royalty-encumbered H.264 standard, they support the OGG/Theodora and WebM free open source standards.
    Microsoft has a H.264 plugin for Firefox, but it is for Windows7 not WinXP or Win Vista. <br />
    http://www.interoperabilitybridges.com/html5-extension-for-wmp-plugin
    There may be other H.264 Firefox plugins out there for WinXP, so do a Google search. Or maybe contact support for that DVR security system and see if they know of or have a Firefox plugin.

  • Can you have a PDF fit on the viewer's screen automatically when exporting from InDesign CS4?

    Can you have a PDF fit on the viewer's screen automatically when exporting from InDesign CS4?

    If you were to upgrade to InDesign CS5 or CS5.5 and if you exported as Adobe PDF (Interactive), you could set the View settings for Page Layout and Zoom.
    While, as Jongware points out, its possible for individual users to override that option (Preferences > Page Display > Default Layout and Zoom), the number who will actually do that is actually very tiny.

  • How do you automatically expand conversations in the viewing pane to see all messages in the thread

    I'm getting super annoyed since apple has started condensing the conversation in  mail in the view window. 
    They have added the "See More from xxxxxxx" in the middle on the converations view pane. 
    How can you have those always automatically expand?  It's a super pain, because every single
    conversation I have to look at what I last wrote.
    Is there are way to automate this????

    Thanks CT. That's not the place that I was looking at. 
    Organize By conversation works on the mail listing but
    not in the content view window.  The spot you are actually
    viewing the content of the message.
    Thanks for the effort.

  • In PSE9 is there a way to enlarge the levels adjustment panel and effects panel for viewing?

    In PSE9 is there a way to enlarge the levels adjustment panel for viewing?  The histogram is so small. 
    I know we can use the arrow keys to change the settings for the histogram, but it is just the overall view of it I would like to see bigger. 
    I think with PSE8 the effects panel could be dragged out of the panel bin and made longer AND wider, but in PSE9 it can only be made longer when dragged outside the panel bin.
    And I think the whole panel bin could be dragged wider or narrower.

    not really apart from changing the resolution, but theres a a couple of things you can do
    you can change the "minimum font size" in Safari (and other apps) in the General tab - this will enlarge any fonts to the minimum size you specify if they are under that size
    the features in the accessiblilty section of system preferences might be worth a look as well
    the pinch zoom feature is also useful
    unfortunately there isn't a 1-button setting somewhere that can do this, because apps, documents, web pages, images etc all work independently from each other, they use different font types, different zoom levels, etc. You can't just enlarge them all in sync without content getting jumbled up/distorted. if enlarge an app/page/document and get it looking good, on the next one you would probably need to zoom in at a different level for it to look right

  • Is there a way to enlarge the overall screen size in a macbook air for easier viewing

    Is there a way to enlarge the the icons/text, etc. on a macbook air for easier viewing without changing the screen resolution?

    not really apart from changing the resolution, but theres a a couple of things you can do
    you can change the "minimum font size" in Safari (and other apps) in the General tab - this will enlarge any fonts to the minimum size you specify if they are under that size
    the features in the accessiblilty section of system preferences might be worth a look as well
    the pinch zoom feature is also useful
    unfortunately there isn't a 1-button setting somewhere that can do this, because apps, documents, web pages, images etc all work independently from each other, they use different font types, different zoom levels, etc. You can't just enlarge them all in sync without content getting jumbled up/distorted. if enlarge an app/page/document and get it looking good, on the next one you would probably need to zoom in at a different level for it to look right

  • I would like to enlarge the text in the firefox 6.0.2 toolbar. (file, edit, view, etc.)

    The Firefox toolbar is rather small and sometimes hard to read depending upon the circumstances. I would like to enlarge the toolbar and text to double its present size. How do I do so?

    To change the interface text size (including the Menu Bar), install the following Add-on.
    *'''''Theme Font and Size Changer''''': https://addons.mozilla.org/en-US/firefox/addon/theme-font-size-changer/
    To change the font size in the web page display area (where you are reading this message):
    *See --> http://support.mozilla.com/en-US/kb/Page+Zoom
    *See --> http://support.mozilla.com/en-US/kb/Text+Zoom
    *Add-ons:
    **'''''Default FullZoom Level''''': https://addons.mozilla.org/en-US/firefox/addon/default-fullzoom-level/
    **'''''NoSquint''''': https://addons.mozilla.org/en-US/firefox/addon/nosquint/
    ***More info on NoSquint: http://urandom.ca/nosquint/
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • How can I enlarge the email page writting to say 150% for better viewing?

    When I use Yahoo with Interned Explorer, I can enlarge the printed email listing and messages up to 400% which is displayed in the lower right corner of the page. I usually keep it on 150% for easier reading. So how can I set the browser to enlarge the page?

    If you zoom the page then Firefox should remember this.
    In case you are using "Clear history when Firefox closes":
    *do not clear the Site Preferences
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/Clear+Recent+History
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, passwords, and other website specific data.
    *http://kb.mozillazine.org/Zoom_text_of_web_pages
    *http://kb.mozillazine.org/browser.zoom.full
    *http://kb.mozillazine.org/browser.zoom.siteSpecific

Maybe you are looking for