Little experience with Java and graphics

I'm writing an applet and I'm first creating a Frame with buttons, textareas, and textfields. What I really need to do is be able to use images 'instead' of the buttons and as a background to the overall Frame as well. In addition (although this part is not very crucial for the time being) how can I create custom pull-down menus (as in ones that look the way I want them to) in the Frame as well?
Does anyone know the best way to add an Image overtop of a component like a button? Please keep in mind that I must avoid any Swing and use only AWT classes. Thanks in advance.

Does anyone know the best way to add an Image overtop
of a component like a button? Please keep in mindonly way you could do this would be to create a Window right over the button and draw something on that
Heavyweight AWT components (aside from Canvas) cannot be drawn over or have their paint method overridden.

Similar Messages

  • Need a little help understanding java and /etc/profile.d/***

    A few days ago I installed jre-6u10-1 and jdk-6u10-1 via pacman on my desktop machine; for the web plugin.
    The packages installed in /opt/java/...
    I later installed jedit, via pacman.  It runs fine as it (/usr/bin/jedit) is hardcoded to look for java in /opt/java/...
    Today, I installed jedit (pacman -S jedit) on my laptop which did not have any java installed.
    Pacman automatically installed openjdk6-jre-6u10-1 as a prerequisite.
    Openjdk installs to /usr/lib/jvm/..., therefore jedit fails as /opt/java... is non-existent.
    I suppose Sun's java and the opensource version are installed in different locations to keep from overwriting each other.
    I could easily edit /usr/bin/jedit to point to the openjdk location and it would work.
    But I'm a little uncertain of the following three files:
    Sun's java installs /etc/profile.d/jre.sh and /etc/profile.d/jdk.sh
    which do the following (respectively):
    export PATH=$PATH:/opt/java/jre/bin
    if [ ! -f /etc/profile.d/jdk.sh ]; then
    export JAVA_HOME=/opt/java/jre
    fi
    and
    export J2SDKDIR=/opt/java
    export PATH=$PATH:/opt/java/bin
    export JAVA_HOME=/opt/java
    The opensource java package installs /etc/profile/openjdk6.sh
    which does the following:
    export J2SDKDIR=/usr/lib/jvm/java-1.6.0-openjdk
    export J2REDIR=$J2SDKDIR/jre
    export JAVAHOME=/usr/lib/jvm/java-1.6.0-openjdk
    #export CLASSPATH="${CLASSPATH:+$CLASSPATH:}$J2SDKDIR/lib:$J2REDIR/lib"
    So I am left with a few options:
    1.  edit /usr/bin/jedit to look in the opensource location
    2.  edit /usr/bin/jedit to use the $J2SDKDIR variable when looking for java
    3.  update the $PATH via /etc/profile.d/openjdk6.sh to include java's location
    I think all three methods would work, but I have limited experience with java and would like some input as to which proposed solution is the best going forward.
    What methods are other java apps using to find java?
    Thanks
    (edit: more descriptive title)
    Last edited by cjpembo (2008-11-11 04:24:47)

    I think the best option would be to ask the maintainer to modify the jedit-bin file, and have it launch
    $J2SDKDIR/bin/jre/java cp $CP -Djedit.home="/usr/share/jedit" -mx${JAVA_HEAP_SIZE}m org.gjt.sp.jedit.jEdit $@
    That way, it should work with both java implementations (completely untested, btw.)

  • This is my experience with MSI, and their NVIDIA GTX 570 reference card.

    Hello my name is James king.
    and This is my experience with MSI, and their NVIDIA GTX 570  reference card.
    (5/27/12) Day one. I update my driver from Beta 301.24 To WHQL 301.42. and as you would expect, it worked. so i restart and go play kerbal space program (if you haven't played this go, play it now i love it) 5 minutes later it starts artifacting, eg. textures stretching, random green spots. "ugh" so i start troubleshooting, reinstall revert and so on. later i give up and go play  Portal 2, i load the game opening screen i see lots (100-250) of little flickering green dots. first instincts says its the cable, test nope. then maybe the screen, test nope. i keep testing  throughout the night, to no avail.
    (5/28/12) so to the internet, for help. 3 hours later nothing, but people with bad cards.                 at opening i call NVIDIA Tech Support, they say to call MSI so i do. 3 calls no pick up, 4th call      and i get a "Support technician" who is no help, says to fill out a RMA form online.                    and so i do more troubleshooting for the rest of the day. and i give up, and go to bed.
    (5/29/12)  i fill out a RMA form, end of day i get an email from MSI that says; "Dear Valued Customer [email] your RMA is pending approval, and you will get an email within 1 weak with shipping information.
    (6/1/12) shipping information, instructions, but no shipping label. 
    (6/4/12) i ship the card, via UPS 
    (6/12/12) after using the most round about route eg. it got to MSI.
    United States                           06/04/2012         6:40 P.M.        Order Processed: Ready for UPS                       
    [my city], MS, United States       06/04/2012         9:10 P.M.        Departure Scan                               
    Jackson, MS, United States         06/05/2012         12:15 A.M.        Arrival Scan                           
    Maumee, OH, United States         06/07/2012         3:40 A.M.        Departure Scan             
    Hodgkins, IN, United States         06/07/2012         7:00 A.M.        Departure Scan             
    Hodgkins, IL, United States         06/07/2012         2:42 P.M.        Departure Scan                 
    Vernon, CA, United States         06/11/2012         10:30 P.M.        Departure Scan               
    Baldwin Park, CA, United States         06/11/2012         11:05 P.M.        Arrival Scan                             
    Baldwin Park, CA, United States         06/12/2012         9:42 A.M.        Delivered
    (6/13/12) email from MSI, says they got it.
    (6/14/12) email from MSI, says it is in procesing.
    (6/20/12) email from MSI, saying they shipped it and that [this] is the tracking number.
    (6/26/12) end of day. i receive the card, and see the case is badly scratched. i install it in my pc and hey it worked (for now). watch some YouTube, and go to play skyrim. start up load my save and i make one step, and my pc hard freezes. "sigh" half an hour later, i give up and go play minecraft 10 minutes in, and it hard freezes. so now more troubleshooting,5 hours later no luck.
    (6/27/12) i have called MSI Tech Support 2 times, when they picked up the phone they say to call customer service. 7 calls later no pickup. 
    and that is it MSI have sent my on the run around too long.

     So are you asking us for help with your PC issues or simply complaining to us about your RMA which we on this forum have nothing to do with. We are MSI product users here the same as you and we are helping each other out with problems on their PCs with their MSI parts. If you need what help we can offer assisting you with a problem then start a new topic and we'll do the best we can to help you.

  • Problem with java and pogo games

    i use mozilla and now with the problems with java and hackers cannot play my pogo games,what can i do? i disabled my java i tried java 6 doesnt work or is not safe,what is a safe way to play games on pogo that use java?

    Oracle has released a Java 7 Update 11 to address security vulnerabilities and you should update to that version.
    *https://support.mozilla.org/kb/how-to-use-java-if-its-been-blocked
    See also:
    *http://kb.mozillazine.org/Java#Windows_installation_issues
    You can find the latest Java version on the Oracle website.
    See Java Platform > Java SE 7U11 and Java 6U38 (Download JRE)
    *http://www.oracle.com/technetwork/java/javase/downloads/index.html

  • Events problem with (Java and ActiveX)

    Hi,
    I use an ActiveX component with Java and i've got a problem with events.
    Java classes were generated with Bridge2Java (IBM).
    In order to manage events I added a listener in my application :
         javaMyActiveX = new MyActiveX();
         javaMyActiveX.add_DMyActiveXEventsListener(new _DMyActiveXEventsAdapter());
    I also added a constructor in the _DMyActiveXEventsAdapter class and I fill the body of methods.
    The ActiveX generates two types of events :
    - The ones are directly generated by methods.
    - The others are generated by a thread.
    With MS Products (VB, Visual C++, Visual J++), I catch all events.
    With java (jdk 1.4), I catch only events generated by methods.
    Can anyone help me.

    I'm not 100% sure, but the last time I used that bridge, it only worked if you ran your Java app within a Microsoft VM.

  • MY BAD EXPERIENCE WITH CHAT AND VISION

    In my personal e-mail I received publicity inviting me to purchase a Skype credit gift card. I thought it was a nice offer and I happened to have a friend that had the need and could use such a gift. I procedeed to purchase a $10 dollar gift card, I did the transaction from Colombia and sent it to my friend in the US. Shortly after the purchase I received a message warning me that my order was being under security scrutiny. I found it unexpected and unjustified (Is my $10 dollar order a security risk of some sort?), but I thought that maybe it was because it was an international order, and I understand the need for security in online transactions, so I decided to not worry, trusting in the spotless service that I have had from Skype up to that point. At that moment I noticed that the one providing the service was no Skype but Chat And Vision (whose website, by the way, looks far less friendly than Skype's).
    Then I received an Email telling me that the order has been rejected. No justification, no explanation. Just a politely worded but most unhelpful and uninformative e-mail.  It made a point of telling me that they didn't retain the payment, yet my card was charged and no refund has been made so far. I replied the e-mail asking for a reason, and how to get a refund. I received the automated reply telling me that somebody would contact me the next day. It's been a day and no reply so far.
    Searching online I found mine was only one in a long list of blunders and poor service from Chat And Vision. The complains on forums and online outnumber the claims of good service. Mine is a very small case compared to other complains I have read about. It was a small purchase for a smal amount, but it turned into an unexpectedly unpleasant experience for something that should have been a simple purchase ( Am I really such a security risk that I can't be allowed to place an order for a gift card?)
    In the end I feel that I was snared into a trap with that offer. I trusted, I paid, didn't receive the goods, haven't yet received the refund, my friend really needed that gift and had to do without, which caused him inconvenience, my high regard from Skype has been tarnished, and I'll hesitate to make new purchases of Skype services in the future, if they keep being powered by Chat And Vision.

    Some updates: I received two e-mails from Chat And Vision, regarding my two questions as to why my order was rejected and how to get my money back. These are the answers:
    The first one (Ticket ID: PBF-650-80186), says: "Thank you for your email. Firstly, apologies for the inconvenience this may have caused to you. Unfortunately, due to security reasons I am unable to divulge this information. However, should you wish to make another purchase with us again, we will try to process your new order instead".
    Polite but uninformative. Notice that beyond an unfocused general apology it does not acknowledge any problem nor does pledge any improvement, just a vague statement that they may allow me to use it's service again if I choose to try (not exactly reasuring).
    A second answer to a second e-mail says: (Ticket ID: SVN-701-71147) "Thank you for your email, please be assured the money will be refunded back to you."
    That's all. Again polite but no useful information, just a vague assurance of refund, somehow, someday into the indefinite future. If it happens I'll post it here but I'm not holding my breath.
    Reading other answers from Chat and Vision posted online here and on other forums dealing with their service, there appears to be a pattern of politeness, vageness, refusal to acknowledge problems and absence of a pledge to improve. Their costumer care seems designed to placate the user without promising to get better, and is so devoid of helpul attitude that it makes me believe that their messages are redacted by a software program, and consumer complains never reach any administrative person. I might be wrong but the doubt has been sown which is a shame. Up until now I was very vocal on my praise for skype, recomending it to family and friends as a very useful and good service, but this experience with Chat and Vision, and my discovery of their costumer service history online, has set me thinking about looking for alternatives to Skype, and certainly has dissuaded me to recomend Skype to anyone ever again,or at least while their sales are still managed by Chat And Vision, or at least while Chat and Vision continues its customer service attitude, polite on the surface but haughty and unhelpful underneath.
    If there are new updates I might post them here, but for now I will not pursue the matter further since the amount involved was small and I see no point in sending more e-mails to Chat and Vision. I just feel bitter that the great service that I felt was Skype has ben tarnished by this experience. Just some final thoughts: 
    I do not complain that my order was scrutinized by security reasons, I understand the risk of illegal activity on online transactions, and the need of online companies to be careful, but the process Chat and Vision used seemed overly unconcerned for the confort of the consumer. It took around a full day for my order to be scrutinized and then rejected, which did let me for a long time in the dark not knowing if my gift would reach the friend I wanted to give it to. This is 2014, does Chat and Vision not have the tecnology to do a better and faster process? Do they scrutinize online orders by hand? I have read more cases similar to mine here on this forum, which to me implies that Chat and Vision are overly and unnecessary zealous on their security procesess. ( Also it is jarring that they seem to consider their clients to be criminals, for no reason at all and with no opportunity to contest the charge.)
    If they are going to reject a transaction on security reasons, why not do it before the payment is processed, not after, which can be stressful to the consumer that gave the money and didn't receive what was advertised, for no real reason. Seems to me there is a mistake in the way the system is set, or there is a clear disdain of what the client might think or feel.
    I think that's all. Thank you if you went all the way thru this overly long rant. If you are a consummer beware that when you buy services from Skype, you are not buying from Skype but from somebody else and that somebody else does not have a spotless record. If you are an administrative person from Skype or Chat and vision, I hope you eventually prove me wrong about your unconcern for the welfare of the consumer. My experience so far is not encouraging but that may change.
    Have a good one.

  • The performance of management system with Java and MySQL

    Hi all,
    I want to develop one management application with Java and MySQL. However I am not sure which is a good way to design the system. The system has to deal with customers' data in the database.
    Should I create objects for every customers when application starts so that I do not need to access to the database often? Or
    Should I access to the database everytime the user want to deal with customer's data?
    Welcome for any suggestion.
    Thank you
    Pat

    Hi
    i i think u should go through MVC model or use connection pooling

  • I am just starting out in graphic design and I wanted to know how to get more involved with either adobe and or graphic design? I am really very interested in working with adobe and graphic design more and becoming more involved with both!!

    I am just starting out in graphic design and I wanted to know how to get more involved with either adobe and or graphic design? I am really very interested in working with adobe and graphic design more and becoming more involved with both!!

    I have now recently downloaded 10.0.2 which is confusing in itself, as, as far as I can ascertain that is actually version 11, but I'm not even sure about that.
    Version 10.0.2 is the newest version and the successor to GarageBand '11 (version 6.0.5).
    The '11 is referring to the iLife '11 suit of multimedia application - the older GarageBand was a part of this bundle.
    Have a look at Edgar's graphical enhanced manuals, the explain very detailed how things work and why. You can buy them as iBooks from the iBook store or directly from the page:
    http://DingDingMusic.com/Manuals/

  • Discussion Forum Portlet - Problems with JAVA and UTF8?

    Hi
    I installed the Discussion Forum Portlet successfully. It also seems that almost everything works fine. There's only a problem if I have new posts that include special German characters (Umlaute) like ä, ö, ü or special French characters like é, è or ç. They are saved correctly in the table but if you view the post the characters are not displayed correctly.
    Example
    input: ça va?
    result: ça va?
    I know that there are problems with Java and UTF8 Database. Is there a possibility to change this (bug)?
    Regards
    Mark

    Here's what I got. I don't see anything that helps but I'm kinda new to using SQL and java together.
    D:\javatemp\viddb>java videodb
    Problem with SQL java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver
    ] Syntax error in CREATE TABLE statement.
    Driver Error Number-3551
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in
    CREATE TABLE statement.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(Unknown Source)
    at videodb.main(videodb.java:31)
    D:\javatemp\viddb>

  • Does anybody have any experience with keyloggers and a good program to detect one on your mac? I think I may have one.

    So yesterday I found out that my email address password had been changed. I don't remember doing this, but it is possible I changed it a while back and considering I keep my email constantly logged in. But at the same time, two of my apps were trying to access their "store". I play a game called League of Legends, which has an online store, and it randomly came up with the message "Could not connect to Maestro" (credit card). Then, Itunes (which I rarely use) came up with "sorry, we could not continue with your purchase". I think it's very strange that all of this happened at the same time, but hopefully it's a case of a forgotten password and two games bugging/crashing. I scanned my entire computer with iantivirus and it hasn't found anything, but I've heard keyloggers can be a bit hard to detect. Does anybody have any experience with keyloggers and if so, what program did you use to detect and destroy it?

    If you think that a keylogger has been installed the only safe thing you can do is erase your drive and reinstall.
    I don't think that is the case however.

  • 3 tiers model with Java and Oracle.

    Hi everybody. I have a problem with my work. I want to design a simple program follow 3 tiers model with Java and database is Oracle. But I do not know how I can design them. Please help me. It will better if you give some source code for each layer.
    Thanks in advance.
    Ky Thanh.

    I'd suggest searching the net for tutorials. Pick out the things you don't know about and need to know (SQL? JDBC? Java? software design in general?) and google: tier architecture, sql tutorial, etc. Sun's Java & JDBC tutorials are at http://java.sun.com/learning/tutorial/index.html
    Source for each tier? Read the JDBC tutorial and you can write the database tier source yourself. Learn Swing/Servlets/whatever you use for the user interface and you can write the top tier. The middle tier is your business logic, which is dependent on your area of business, and you'll need to know about the business and just general programming. Then if the tiers need to be distributed (hopefully not), you'll need to learn EJB or something.
    I hope you haven't been given a task there you aren't ready to take on... Learning to swim by jumping into the river is a great way to learn in a school assignment, but you mention work, and learning that way at work sounds a bit risky to me.

  • Anyone got experience with LabView and JTAG ?

    Anyone got experience with LabView and JTAG ?
    Especially in system programming of Altera and FLASH

    Yes, I've actually driven JTAG using DIO, but this was a project in itself.
    I guess you're just wanting to get the job done! I'm currently evaluating
    gear to do the same job myself, in addition to interconnect testing. I've
    been looking at JTAG Technologies equipment. They do PCI/PXI cards and the
    SW, with a LabVIEW interface.
    They're at:
    www.jtag.com
    You'll need to be sitting down when you get their quote though - their development
    system costs about the same as a decent car!
    Cheers
    -Sean.
    [email protected] wrote:
    >Anyone got experience with LabView and JTAG ? >Especially in system programming
    of Altera and FLASH

  • This my first experience with itunes and using a gift carddownloaded an album and only half of a few songs played before jumping to the next song

    This is my first experience with itunes and I chose to download a Mark Knopfler album. The first three songs stopped half way and instantly started the next song. How do I re-load the songs since i now "own" them? Thanks. Luce.

    If your country's iTunes Store allows you to redownload purchased tracks, I'd delete your current copies of the dodgy tracks and try redownloading fresh copies. For instructions, see the following document:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Otherwise, I'd report the problem to the iTunes Store.
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the items that are not playing properly. If you can't see "Report a Problem" next to the items, click the "Report a problem" button. Now click the "Report a Problem" links next to the items.

  • Experiences with Yosemite and Mainstage

    Did any of you try Yosemite yet? I'm eager to upgrade but I'll wait with upgrading till next week when I have a couple of days without gigs. Would like to hear your experiences with Yosemite and Mainstage (3).

    I tried Yosemite with MainStage a while back, while Yosemite was still in beta.  At first, everything seemed fine.  About an hour or so after starting MainStage, we took a break.  When we got back on stage, I went to play and there was about a full second of latency!  I had to restart MainStage in the middle of a song.
    After about the third time this happened to me, I reverted back to Mavericks, and the problem hasn't happened since.  Thus, I'm nervous about upgrading to Yosemite again...
    I'm using a Steinberg UR22 interface, with an early 2011 MacBook Pro 17", 2.2 GHz Intel Core i7, 16 GB 1333 MHz DDR3
    Joe

  • Help with buttons and graphics

    ok all I get on this is about a hundred runtime errors starting with NullPointerException.
    public class Ers2View extends FrameView{
    Image image;
    static Paint paint;
    public Ers2View(SingleFrameApplication app) {
    super(app);
    initComponents();
    slapButton = new javax.swing.JButton();
    slapButton.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    slapButtonActionPerformed(evt);
    private void slapButtonActionPerformed (java.awt.event.ActionEvent evt) {                                          
         Graphics g= image.getGraphics();
         Paint rect=new Paint();
         Paint.paint(g);
    (new file)
    package ers2;
    import java.awt.Graphics;
    public class Paint{
    public static void paint(Graphics g) {
         g.drawRect (10, 10, 200, 200);
    ok guys comon I really need help on this one. Im using netbeans btw.

    AndrewThompson64 wrote:
    >
    No i know where the problem is but i have no idea how to fix it. I think part of the problem is that I never tell it to draw on the JPanel. But Netbeans makes weird code so im not sure how to make the drawRect command implemented on the panel.>
    - People about these parts comment on Java problems, not Netbeans problems. Netbeans has its own [forums for Netbeans problems|http://forums.netbeans.org/] (<- link), try them.
    - As far as the Java code goes, you will get a much better chance of help if you..
    a) Post an SSCCE (<- link), rather than random code snippets that you think encapsulate the problem. Let's face it, you don't know the answer, and until you do, you cannot be sure the fix is to be found in the code snippets you post. Can you?
    b) Post code in between code tags to retain the formatting and indentation. To do that, select the code and click the CODE button on the Plain Text tab of the message posting form.Easy there tiger, this is not a netbeans problem, so he is in the right place.
    The code does look to be SSCCE or close anyways (remove the ... lines and if it still compiles and run I would say this is SSCCE).
    The code tags is a huge problem here though. I am trying to read it without getting a headache, best as I can tell the OP seems to be doing some really funny stuff with paint. Like is he overriding paint to paint a square? That can't be good!
    JSG

Maybe you are looking for