I must be stupid (Graphical Applications)

Ok, like my subject says, "I must be stupid." I am fairly new at Java,
about 1 year to be approximate, but I have never done any type of
graphical application. I have done a few graphical applets, but I seem
to be having a lot of trouble with this. Here is what I want, I want
a window (frame) to open which has a menu bar at the top. The problem I
seem to have with this should be a simple answer. I want the color of
the menu bar to be the same color as all other menu bars that the user
uses (i.e. Internet Explorer or Netscape Navigator). I am not sure if
this is possible without making my own menu. If I have to, I will
probably do this. Next, I want to have some buttons and text boxes down
the left side of the window and a canvas to the right. Everything done,
it should look something like this:
Simple3D - # x|
____________________________________________________________|
File Edit Help|
____________________________________________________________|
| |
Buttons| __________________________________ |
| | | |
| | | |
| | | |
Textbox| | Canvas to draw on | |
| | | |
buttons| | | |
| |_________________________________| |
| |
| |
| |
_______|____________________________________________________|
Okay now. Here seems to be the problem. I do not know how to draw to
the canvas. If I can be told how to draw to the canvas, or even make
my class extend canvas and use the class instead of a real canvas, I
am pretty sure that I can get the rest. I would like to keep this as
object oriented as possible because this is one of my first real
programs that will be object oriented. If anyone can please help me
out, I would appreciate it greatly. Thanks ahead.

Ok, like my subject says, "I must be stupid." I am fairly new at Java,
about 1 year to be approximate, but I have never done any type of
graphical application. I have done a few graphical applets, but I seem
to be having a lot of trouble with this. Here is what I want, I want
a window (frame) to open which has a menu bar at the top. The problem I
seem to have with this should be a simple answer. I want the color of
the menu bar to be the same color as all other menu bars that the user
uses (i.e. Internet Explorer or Netscape Navigator). I am not sure if
this is possible without making my own menu. If I have to, I will
probably do this. Next, I want to have some buttons and text boxes down
the left side of the window and a canvas to the right. Everything done,
it should look something like this:
Simple3D***********************************************- # x|
____________________________________________________________|
File Edit***********************************************Help|
____________________________________________________________|
*******|****************************************************|
Buttons|***********__________________________________*******|
*******|***********|*********************************|******|
*******|***********|*********************************|******|
*******|***********|*********************************|******|
Textbox|***********|******Canvas to draw on**********|******|
*******|***********|*********************************|******|
buttons|***********|*********************************|******|
*******|***********|_________________________________|******|
*******|****************************************************|
*******|****************************************************|
*******|****************************************************|
_______|____________________________________________________|
Okay now. Here seems to be the problem. I do not know how to draw to
the canvas. If I can be told how to draw to the canvas, or even make
my class extend canvas and use the class instead of a real canvas, I
am pretty sure that I can get the rest. I would like to keep this as
object oriented as possible because this is one of my first real
programs that will be object oriented. If anyone can please help me
out, I would appreciate it greatly. Thanks ahead.
P.S. I forgot that this forum deletes the white space.
Try to imagine the asterics as the background color or something.
Thanks

Similar Messages

  • LightDM: How to stop non-graphical applications on session logout?

    Hi all,
    I'm currently moving from XDM to LightDM and have a hard time figuring out how to clean up after myself when my session ends.
    Here's the problem:
    I start two non-graphical applications in ~/.xprofile
    offlineimap
    ssh-agent
    I want to cleanly kill these when my graphical session ends
    What would be the best way to achieve this?
    What I tried until now:
    Add ~/.xlogout which does the cleanup
    Create /etc/lightdm/Xsession-mine which calls /etc/lightdm/Xsession and then ~/.xlogout
    Modify /etc/lightdm/lightdm.conf to use /etc/lightdm/Xsession-mine as session wrapper
    Result: ~/.xlogout doesn't seem to be called, probably due to exec in Xsession
    History:
    With XDM I would start my window manager in the foreground (without exec) in ~/.xinitrc and when it returns call my cleanup code.
    Thanks in advance for all help and suggestions!
    Timo

    Hi graysky,
    graysky wrote:Haven't used lightdm in a long time... does it have a PostLogout function similar to lxdm?
    https://wiki.archlinux.org/index.php/Lxdm#Configuration
    it does have something alike:
    # session-cleanup-script = Script to run when quitting a user session (runs as root)
    However, as the documentation states, this script is run as root, so I can't clean up on a per-user basis (or can I?).
    Kind regards,
    Timo

  • Non graphical Applications

    Hi
    A lot of classes exist for helping creating Graphical Applications. But can anyone tell if there's classes for creating non Graphical Applications - that is 'good old' character based user interfaces meant to run through a telnet session.
    Regards
    Hans Peter

    I dont know general classes for that, sure you will spend more time trying to find it, that writing it. Maybe this could be an example:
    public class Class
    /** Here you variables */
    int op = 0;
    int op1= 0;
    public static void main (String args[])
    while( op!=N)
         menuPrincipal();
         op = Console.readInt( " Seleccion: " );
         System.out.println();
         switch( op )
         case 1:
         /** some method */          
         break;
         case 2:
         /** some method */
         break;
         case N:
         op1 = 0;
         while( op1 != M )
              menu2();
              op1 = Console.readInt( " Seleccion: " );
              System.out.println();     
              switch( op1 )
              case 1:
              /* some method */
    break;
              case 2:
              /* some method */          
         break;
         break;
              public static void menu1()
              System.out.print("\n");
              System.out.println(" Flechado de Villa Euler " );
              System.out.println("--------------------------");
              System.out.println();
              System.out.println(" 1. Cargar Grafo");
              System.out.println(" 2. Mostrar Grafo");
              System.out.println(" 3. Mostrar Alcances " );
              System.out.println(" 4. Imprimir Conjunto de Nodos y Lados " );
              System.out.println(" 5. Recorridos " );
              System.out.println(" 6. Salir " );
              System.out.println();
              public static void menu2()
              System.out.print("\n");
              System.out.println(" Recorridos >>> " );
              System.out.println();
              System.out.println(" 1. Circuito Euleriano");
              System.out.println(" 2. DFS ");
              System.out.println(" 3. BFS " );
              System.out.println(" 4. DFS con costos " );
              System.out.println(" 5. BFS con costos " );
              System.out.println(" 6. Dijkstra Secuencial " );
              System.out.println(" 7. Dijkstra HEAP " );
              System.out.println(" 8. A* (opcion a)" );
              System.out.println(" 9. A* (opcion b) ");
              System.out.println(" 10. Volver al menu principal");
         System.out.println();
    /** the implemention of your methods ... or whatever*/
    Regards, JTWN

  • [SOLVED]Unable to run Graphical applications as root/sudo

    Ok so ive been working on getting my very first Arch install up and running and I need to get the catalyst drivers running for my HD6850 because I plan on doing some wine gaming.
    So I followed the instructions here on the wiki for ATI catalyst and I now have the drivers up and running, tried glxgears and everything is fine. The issue I am having Is that when I go under the settings menu in KDE I have the "AMD Catalyst control center" there, however I do not have the (Administrative) option that I get with all other distros. I need to run the CCC as root to beable to configure my multiple monitors.
    In a terminal when i enter;
    sudo amdcccle
    It returns with the following;
    No protocol specified
    amdcccle: cannot connect to X server :0
    So after a little digging I found this thread on the ubuntu forums that was quite helpful;
    http://ubuntuforums.org/showthread.php?t=307984
    So I ran
    DISPLAY=:0.0 xhost +
    then tried again to run
    sudo amdcccle
    and like magic it worked and I was able to configure my displays.
    However this is not a permanent fix. Can anyone see a more permanent solution to this issue? This affects more than just the Catalyst Control Center; It stops me from running any graphical application as root or with sudo. Also can anyone explain what is causing the issue?
    I have searched to the best of my ability and as you can see I have for the most part fixed the issue, however I cannot seem to find a permanent fix, nor do I really know what caused the issue to begin with.
    Last edited by relik (2011-07-03 20:21:52)

    SOLVED
    I took your advice about installking something like gksudo, and rememberd that on my kubuntu install I had something called kdesu. So Since im running KDE and not Gnome, I did some searching and found out how to install kdesudo using the AUR.
    Just followed the install guide here for Yaourt ---> https://wiki.archlinux.org/index.php/Yaourt
    Once I did that i just ran
    yaourt kdesudo
    selcted #1 and installed.
    Now when I need to run a GUI based app as root I type in
    kdesu <NAME OF APP>
    So to solve my original issue I just run
    kdesu amdcccle
    instead of
    sudo amdcccle
    This seems to work for any app that needs to be ran a root with a GUI.
    Also if your like me and you want to beable to just open CCC from your kickoff menu then do the following;
    1. Right click kickoff > edit applications
    2. Go to "Settings" > ATI Catalyst Control Center
    3. In the Command Field add "kdesu" without quotes to the begining of the line so it looks like this
    kdesu amdcccle
    4. Save
    Last edited by relik (2011-07-03 20:22:55)

  • Ssh to iMac from my PC with graphic applications

    How can I ssh to my iMac from my window PC?
    I am using SecureCRT + Xming to ssh to my iMac, but I could not open the graphic applications (e.g. xv) through ssh. (I can do it when ssh to a Linux machine though).
    Do I have to setup something in my iMac machine?
    Is there any window software (other than SecureCRT + Xming) that can help me to do that?
    Thanks.

    Generally speaking, you tunnel your X11 X-Windows session by starting the ssh session using the -X (capital X) or -Y (capital Y) ssh command line option. This establishes an X11 tunnel, and on the remote system associates your DISPLAY environment variable with the remote end of the ssh tunnel. Typically DISPLAY looks something like localhost:14.0
    I do not know how to tell your SecureCRT + Xming setup to export your X11 display server's DISPLAY environment to Mac OS X.
    I also assume you have an X11 display server running on your Windows PC.
    Note: Terminal, Unix, command line (such as ssh) questions are best asked in the Mac OS X Technologies > Unix Forum
    <http://discussions.apple.com/forum.jspa?forumID=735>

  • Windows RDP: what is the most robust graphics application?

    I use RDP to connect to a Windows 7 box on a LAN in order to run QuickBooks.
    If I connect from a Windows box using Microsoft RDP, QuickBooks runs as if it was on my desktop. When I connect from my Arch desktop, using Remmia, for example, I must lower the color depth to 16bpp to keep the QuickBooks GUI from blocking and tearing. It functions fine, but it looks nasty.
    Has anyone found a RDP application that delivers graphics performance on par with Windows RDP? Thanks in advance for you help!

    Thanks. As I mentioned, I'm using Remmina, and FreeRDP is one of its dependencies. I was hoping to find an app that provided better graphics. Since they're both based on RDP released under the Apache license, maybe we're using the best available already.

  • List of Applications which must be kept in Applications folder?

    Which applications must be kept inside the Applications folder? Is there a list extant or would anyone like to contribute one here? I understand with the huge number of applications available a fully comprehensive one probably isn't feasible. I have about 100GB of various applications and may need to move as many as possible to an external drive on upgrading to Lion (I will have to replace my current Intel Core Duo iMac and the model I am looking at has a smaller internal drive).
    I already understand how to move home folders using System Preferences (right-click on the Account and go from there, heeding warnings).
    <Edited by Host>

    Thanks for taking the time to reply. You do make a valid point but I feel it does not apply in my case:
    1) I keep applications not just to use them but to study how they work and similarities and differences between them, having an ambition to design and program my own. I like to keep them at hand because I find the process of finding and downloading applications incredibly tedious,
    2) It is quite unlikely I will remember what I have deleted, meaning when I need to re-download I may waste time looking for other alternatives which may be inferior or expensive, or find that a product has been discontinued, or be stuck with a problem for a long time, forgetting I had already deleted a handy app which could provide the solution, and
    3) I believe some redundancy is worth having in case of reliability issues (for example, my DVD player and TV are very old and/or poor quality and I may not find the cash to replace them in the short term if either or both failed).

  • Must force quit Mail application

    I am most used to using Entourage as my mail application but have been trying to use Mail but it constantly freezes and then I must Force Quit to start over. Keep going back to Entourage but of course I need Mail, for example, if I want to mail contents of webpage in Safari. What's the deal with Mail. Are there known problems?

    Verify/repair the startup disk (not just permissions), as described here:
    The Repair functions of Disk Utility: what's it all about?
    Go to Apple Menu > System Preferences > Network, choose Network Port Configurations from the Show popup menu, and make sure that the configuration used to connect to Internet appears at the top of the list. Leave checked (enabled) only the port configuration needed to connect to Internet and Built-in Ethernet (in that order if not the same), uncheck (disable) the rest of network port configurations, and see whether that helps — if it doesn’t, turn ON again the ones you want enabled.
    Do you have any Mail plug-ins? In the Finder, go to each of the following folders (if they exist). What do you see there?
    /Library/InputManagers/
    /Library/Mail/Bundles/
    ~/Library/InputManagers/
    ~/Library/Mail/Bundles/
    To make accurately reporting this information easier, you may open /Applications/Utilities/Terminal, type the following command (you can just copy it here and paste it in Terminal), and press <Return>. You can then copy the output of that command from Terminal and paste it in your reply to this post:
    ls -1 /Library/InputManagers /Library/Mail/Bundles ~/Library/InputManagers ~/Library/Mail/Bundles
    Note: For those not familiarized with the ~/ notation, it refers to the user’s home folder. You can easily locate any of the folders referred to in this post by copying the folder path here, doing Go > Go to Folder in the Finder, and pasting the folder path there.

  • BE6K 9.0 must install one provisioning application ?

    Hi everyone, I have read one document called ' implement be6k '. it say only one provisioning application is must be installed. So I don't know if the be6k can run  without install provisioning application. 
       Thanks a lot !                 

    Hi
    It is not mandatory to install provisioning application. You can use the other application without provisioning application on UCS box.
    Regards
    Ronak Patel
    Rate all helpful post by clicking stars below the answer.

  • I Must Be Stupid (Ken Burns Effect)

    My problem is thus.
    Using the Ken Burns effect on a photo which lets say is a full frontal picture of someone standing it zooms in on the mid-section and head is gone. What I want to do is start the effect on the head and zoom out to a full body shot. I say I am stupid because I have read and re-read the help for this topic and I just don't get it having tried anything. Any help in accomplishing this step by step would be apreciated and a place in heaven will be awaiting you. LOL. Kevin

    Kevin:
    With the KB effect turned on for that photo, set the KB "lever" to start and zoom and adjust the photo to get what you want for the start. Then click the lever to end and reset the photo with the zoom and sliders. That should do it.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.

  • When I try opening iPhoto on my iMac (OSX 10.9.2) it says I must first update the application; when I try doing so from the App store, it says there are no updates available. I have not renamed or moved iPhoto which was preinstalled. How to solve?

    When I try opening iPhoto on my iMac (OSX 10.9.2) it says I must first download the update; when I try doing so from the App store, it says there are no updates available.  Stuck in a classis Catch-22 - any ideas how I might solve the problem?

    Thanks a lot for your swift response. And sorry if it was a bit too hectic to go through my detailed query (which I did because it was misunderstood when I asked previously). As I've mentioned above, I was informed that updating to 5.0.1 would '''require''' me to '''delete''' the current version and then install the new one. And doing so will involve losing all my bookmarks. I guess I should have been more specific and detailed there. By losing, I didn't mean losing them forever. I'm aware that they're secured in some place and deleting and installing the software doesn't harm its existence. What I meant that if I install the new version, I'd have to delete the old one. And after installing the new version, I'd have to transfer them (bookmarks) back from wherever they are. Get it? When it updated from 3.6.9 to 3.6.13, and from 3.6.13 to 3.6.18, I didn't need to follow that process. They were already present on their own.
    BTW, I'm having no problems with 3.6.18 but after learning about the existence of version 5.0.1, I'm a bit too eager to lay my hands over it.
    Thanks for your help; hope this wasn't extremely long.

  • I must be stupid... Where have my playlists gone?

    Touch 2G... I went to a lot of trouble to create my playlists. They synched okay when loading the Touch. But now, when I touch Playlists, all I see is Genius and On-The-Go. Where is all my music? I can access it through the alphabetical lists of Artists, Songs and Albums, but my Playlists are nowhere.
    What am I missing?

    Ah! Okay. The Touch must have been recently synched to show the Playlists. That's very different to regular iPods I have owned when the playlist list is always available.
    Now I have another problem: it's regarding permanent extreme loudness. That's for another thread I think.

  • My Intel Imac is experiencing crashes with some graphical application like wow or safari and the screen appear frozen and I hear some sound continuously some way to check what it's wrong pls

    Hardware Overview:
      Model Name:          iMac
      Model Identifier:          iMac12,2
      Processor Name:          Intel Core i5
      Processor Speed:          3.1 GHz
      Number of Processors:          1
      Total Number of Cores:          4
      L2 Cache (per Core):          256 KB
      L3 Cache:          6 MB
      Memory:          4 GB
      Boot ROM Version:          IM121.0047.B1F
      SMC Version (system):          1.72f2
    AMD Radeon HD 6970M 1024 MB graphics
      Type:          GPU
      Bus:          PCIe
      PCIe Lane Width:          x16
      VRAM (Total):          1024 MB
      Vendor:          ATI (0x1002)
      Device ID:          0x6720
      Revision ID:          0x0000
      ROM Revision:          113-C2960H-188
      EFI Driver Version:          01.00.544
      Displays:
    iMac:
      Resolution:          2560 x 1440
      Pixel Depth:          32-Bit Color (ARGB8888)
      Main Display:          Yes
      Mirror:          Off
      Online:          Yes
      Built-In:          Yes
      Connection Type:          DisplayPort

    Think its happening to me too!
    Is this the same that happens to your iMac?
    https://discussions.apple.com/thread/5198555

  • Graphical application for an APC uninterruptible power supply (UPS)?

    Hi,
    I have a APC UPS (uninterruptible power supply) and I'm looking for an application that shows me more than just some percentages of the capacity of the battery. I know that and some settings can be done by the energy saving settings.
    But the Parachute application for windows, shows you the present load of the UPS so you can see if it is possible to power additional devices with it.
    It also shows you some more in detail information.
    So I was thinking of a tool like "APC Tracker" from Equinux.com, but 112$ is more than I paid for the UPS! So that is a no go. And now I was wondering if some of you might know an alternative?
    I know that there is a packet called NUT for MacPorts and also APCUSPd. But from what I've read. Both will interfere with Apples Energy Saving settings.
    cu AssetBurned

    Craig Baron wrote:
    Agreed, but I don't see how to do that in conjunction with the automatic shutdown capability of the UPS. I doubt the current OS is capable of responding to a usb signal by waking up then shutting down. It seems unlikely that apple or the UPS vendors would anticipate that someone would want this feature.
    On the contrary, that's exactly what people want, and Apple and at least some of the vendors do just that.
    The U.P.S. doesn't actually do the shutdown, of course, OSX does, and you're talking about two different things anyway.
    A good U.P.S. sends more than one signal. It sends frequent updates of the power level of the batteries, and notifies OSX when it's on battery power.
    OSX wakes a sleeping Mac up immediately when the utility power fails, so it can send a message.
    The automatic shut down is scheduled, via System Preferences, by your choice of time on battery power, estimated time left on the battery, and/or remaining battery power level (percent).
    APC's +Power Chute+ software, which I used with Panther, worked similarly, and I'd expect other decent 3rd-party U.P.S. software to have similar capabilities.

  • HT5225 I must be stupid, do you know where an actual link is?

    I cannot find where to even move to icloud in the .me.com/move page !!!!!  my system does not meet the requirements to do the whole deal so . . .
    I go to that page and all it has is inofrmation and instructions that seem to go no where!

    Welcome to the Apple Community.
    ........ my system does not meet the requirements.......
    Just tick the box that says it does.

Maybe you are looking for

  • Error reading the carrier

    i am having a problem with my iphone 4s it doesnt read the carrier and it doesnt show the imei number

  • User feedback please:  graphics cards/hard drives

    Hey there. I'm looking to upgrade my G5 quad with new hard drives and a graphics card. I'm interested in the 1 TB hitachi drives that are out. I'm also looking for a new graphics card for my 30-inch display. The main concern I have is avoiding defect

  • Applets

    i have a simple question when writing an applet in java is it possible to input codes in applets same as codes for java. and if not how do we write for example do while()code thank you in advance

  • Cannot play Adobe Access Protected Content in Chrome (version 30 and higher); Error 3321/3322?

    Symptom: An end-user cannot play Adobe Access protected content.  The client application returns a persistent 3321 (Individualization Error) or 3322 (Device Binding Failure) error code. Root Cause in Chrome Browser: Adobe Access DRM must create a uni

  • What makes a JavaFx 1.2 Scene Graph Refresh?

    My first question =). I'm writing a video game with a user interface written in JavaFx. The behavior is correct, but I'm having performance problems. I'm trying to figure out how to figure out what is queuing up the refreshes which are slowing down t