Why it dont show the Pictures in the window?
I am unable to find out, why the Pictures arent shown...
The Pictures are in the correct folder.
The program runs but dont show the 3 Pictures.
What is the problem?
Code:
import java.awt.*;
import java.awt.Color;
import java.applet.*;
import java.awt.image.*;
import java.awt.event.*;
public class BildInFenster extends Frame{
public void zeichnen(Graphics g){
Image img1, img2, img3;
img1 = Toolkit.getDefaultToolkit().getImage("1.jpg");
img2 = Toolkit.getDefaultToolkit().getImage("2.jpg");
img3 = Toolkit.getDefaultToolkit().getImage("3.jpg");
MediaTracker tr = new MediaTracker(this);
tr.addImage(img1, 0);
tr.addImage(img2, 1);
tr.addImage(img3, 2);
try {
tr.waitForAll();
catch (InterruptedException ex){
g.drawImage(img1, 20, 20, 100, 100, this);
g.drawImage(img2, 20, 170, 100, 100, this);
g.drawImage(img3, 20, 320, 100, 100, this);
public static void main (String []args){
Frame fenster = new Frame();
fenster.setTitle("Einarmiger Bandit");
fenster.setSize(500, 600);
fenster.setVisible(true);
WindowListener wl = new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
fenster.addWindowListener(wl);
Thank you for your help!
Hello My Dear Frend,
Do u think that ur BildInFenster class's object will be called automatically???????,
Please make a note that u r not calling the object of the BildInFenster Class.
Make the Following Changes
import java.awt.*;
import java.awt.Color;
import java.applet.*;
import java.awt.image.*;
import java.awt.event.*;
public class BildInFenster extends Frame{
public BildInFenster()
repaint();
public void paint(Graphics g){
Image img1, img2, img3;
img1 = Toolkit.getDefaultToolkit().getImage("1.jpg");
img2 = Toolkit.getDefaultToolkit().getImage("2.jpg");
img3 = Toolkit.getDefaultToolkit().getImage("3.jpg");
MediaTracker tr = new MediaTracker(this);
tr.addImage(img1, 0);
tr.addImage(img2, 1);
tr.addImage(img3, 2);
try {
tr.waitForAll();
catch (InterruptedException ex){System.out.println(ex);
g.drawImage(img1, 20, 20, 100, 100, this);
g.drawImage(img2, 20, 170, 100, 100, this);
g.drawImage(img3, 20, 320, 100, 100, this);
public static void main (String []args){
BildInFenster fenster = new BildInFenster(); // instead of the Frame object call ur BildInFenster Classes Object
fenster.setTitle("Einarmiger Bandit");
fenster.setSize(500, 600);
fenster.setVisible(true);
WindowListener wl = new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
fenster.addWindowListener(wl);
}
Similar Messages
-
Why I dont have the OS X instead DVD with my MacBook pro?
Why I dont have the OS X instead DVD with my MacBook pro?
If you were running 10.7 or later, and had a normal install, there are two ways to get there
Command-R at Startup is the usual method.
Option key at Startup draws a gray screen and puts up an Icon for each Bootable Volume. Among them should be Recovery_HD. Choose that and proceed.
The Recovery_HD partition is treated as a special case, and is NOT shown by default in Disk Utility. There are parameters you can change to get Disk Utility to show all partitions. -
I am using the iphone 4s in india now. i bought it from canada (factory unlocked). But here in india. when i put my vodafone sim in 4s. It only shows th name of the carrier but dont show the range towers. i tried airtel and reliance carriers also.but the result was same. now what can i do??
BobbyLe wrote:
I could not follow the AT&T instruction because my network (Optus) doesn't have anything as username or password or dial-up phone number. The only parameter I needed to key into Mobilink (the software I am running on the S10 is the APN which is: connectme that's it no number, no PIN, no password, nothing else.
How do I tell Windows to do that?
*99***1# <--- the number to call
at+cgdcont=1,"ip","connectme" <----- the string to put in the advanced field of the modem -
my iphone 4s wont connect in apple tv 3rd gen dont show the airplay icon, but apple tv can connect in Bose sound touch 20 via airplay, and the iphone also connect to sound touch 20 via airplay, ive just buy it yesterday in Mediamarkt Spain,, so it means theres something wrong between my iphone and the apple tv? please me
Hi jaredfox06,
If I understand the issue correctly, you have recently purchased a used iPhone and you do not see your Apple TV in the control center in order to AirPlay. To troubleshoot this issue please follow the steps outlined below.
Try these steps first
Make sure that you have the latest software on your iOS device and Apple TV.
Make sure that both devices have Wi-Fi turned on.
On your iOS device, go to Settings > Wi-Fi.
On your Apple TV, go to Settings > General > Network.
If you're trying to use peer-to-peer AirPlay, make sure that both devices have Bluetooth turned on.
On your iOS device, go to Settings > Bluetooth.
On your Apple TV, go to Settings > General > Bluetooth.
If you don't see AirPlay in Control Center
When an AirPlay-enabled device is available, you'll see AirPlay in Control Center on your iOS device.
If you don't, try these steps:
Restart your iOS device and Apple TV.
Connect both devices to the same Wi-Fi network.
On your iOS device, go to Settings > Wi-Fi.
On your Apple TV, go to Settings > General > Network. If your Apple TV is connected using Ethernet, make sure that it’s plugged in to the router you're using for Wi-Fi.
On your Apple TV, make sure that AirPlay is turned on. Go to Settings > AirPlay.
Get help using AirPlay and AirPlay Mirroring on your iPhone, iPad, or iPod touch - Apple Support
Have a good one,
Alex H. -
I have an ipod touch 4th gen. why does it show the wrong album artwork on my ipod and it's fine on itunes. why is that and is there any way to fix it? please help!
I think it can't find the right or any artwork and ends up putting junk in there.
And can happen with artist and other tags.
probably fine with commercial media but otherwise....? I think you have to manaully go in and edit
I also don't like how it handles and stores non-Apple iTunes store content. -
Hi,
We are developing quite a few excel worksheet reports.
The reports dont show the cells if contain formulas ( when opened in iPad or ipod ),
Is there any good solutions .
Thanks.There is no version of Excel for iPads. iPads come with something that lets you view the contents of Excel files but it implements only the common easy features and there are (literally) hundreds of things you can do in Excel that it doesn't know how to show on the screen, including some functions.
If you intend to work with spreadsheets on an iPad I suggest you buy Numbers for iPad
http://www.apple.com/apps/iwork/numbers/
which understands more (but still not 100%) of the things that Excel does. It is so cheap that you can probably afford to buy a copy just to see whether it does what you want.
If you are doing things with spreadsheets and intend to be primarily working on iPads then I suggest you actually use Numbers on a Mac as well, rather than using Excel at all. -
how i can increase the volume when i playing a video? dont showing the volume control in the video player..
Are you sure you increased the caller volume? This is only adjustable while in conversation. So, while you are calling you'll see a few icons on your screen and one of them is to adjust your caller volume.
-
Why does safari show the last used page when the Ipad is turned on again
Why does Safari show the last used page when the IPad is next used?
Read this article: Open iOS Safari to a blank page, http://www.macworld.com/article/159303/2011/04/ios_safari_blank_page.html
-
Hiding Window bar which shows the window name
Can anybody help me in hiding the window bar which shows the window name .
Just curious... why do you guys want to hide the window bar? It would make your application look different from standard applications running on their platform.
Are you aware that you can change the title on the window bar so it reflects the name of your application? -
QuickTime is showing the Windows 7 short filename at the top
All of a sudden in the last couple of weeks, QT has decided to start showing the Windows 7 short filename at the top of the window. What can I do to get the long filename displayed instead? Help!
I believe you are talking about taskbar previews. To enable them you need to change a hidden preference.
# Type '''about:config''' into the location bar and press enter
# Accept the warning message that appears, you will be taken to a list of preferences
# Locate the preference '''browser.taskbar.previews.enable''' and double-click on it to change its value to '''true''' -
Simple webDynpro - RFC dont show the Data in table
Hello all.
I`m develop a simple application test in NWDS.
This application execute data in a table from the standard function module BAPI_COMPANY_GETLIST. simple return the list of companys.
But when i execute the application, its dont shw any errors but the data dont show in the webdynpro table.
What is wrong ?
thanks.Hi JV.
This the code in method implementation.
package comp_package;
//@@begin imports
import comp_package.wdp.IPrivateCompanyComponentView;
import com.sap.mw.jco.JCO;
import model_package.Comp_Model;
import model_package.Bapi_Company_Getlist_Input;
import com.sap.tc.webdynpro.progmodel.model.api.WDModelFactory;
import com.sap.tc.webdynpro.progmodel.model.api.WDModelScopeType;
//@@end
//@@begin documentation
//@@end
public class CompanyComponentView
Logging location.
private static final com.sap.tc.logging.Location logger =
com.sap.tc.logging.Location.getLocation(CompanyComponentView.class);
static
//@@begin id
String id = "$Id$";
//@@end
com.sap.tc.logging.Location.getLocation("ID.com.sap.tc.webdynpro").infoT(id);
Private access to the generated Web Dynpro counterpart
@see comp_package.wdp.IPrivateCompanyComponentView for more details
private final IPrivateCompanyComponentView wdThis;
private final IPrivateCompanyComponentView.IContextNode wdContext;
private final com.sap.tc.webdynpro.progmodel.api.IWDViewController wdControllerAPI;
private final com.sap.tc.webdynpro.progmodel.api.IWDComponent wdComponentAPI;
public CompanyComponentView(IPrivateCompanyComponentView wdThis)
this.wdThis = wdThis;
this.wdContext = wdThis.wdGetContext();
this.wdControllerAPI = wdThis.wdGetAPI();
this.wdComponentAPI = wdThis.wdGetAPI().getComponent();
//@@begin javadoc:wdDoInit()
/** Hook method called to initialize controller. */
//@@end
public void wdDoInit()
//@@begin wdDoInit()
// Creates the input elements
Bapi_Company_Getlist_Input input = new Bapi_Company_Getlist_Input();
// Creates an instance of a client to the remote SAP system
client = JCO.createClient("100", //SAP logon client number
"user", //SAP logon user
"pass", //SAP logon password
"en", //SAP logon language
"XXXX", //Host name of application server
"XX"); //SAP system number
// Creates the model instance
model = (Comp_Model)WDModelFactory.getModelInstance( Comp_Model.class, WDModelScopeType.APPLICATION_SCOPE);
// Assigns the client to the model
model.setJcoClient(client);
//@@end
//@@begin javadoc:wdDoExit()
/** Hook method called to clean up controller. */
//@@end
public void wdDoExit()
//@@begin wdDoExit()
//@@end
public static void wdDoModifyView(IPrivateCompanyComponentView wdThis, IPrivateCompanyComponentView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
//@@begin wdDoModifyView
//@@end
//@@begin javadoc:getCompany()
/** Declared method. */
//@@end
public void getCompany( )
//@@begin getCompany()
client.connect();
System.out.println("passo1");
try {
wdContext.currentBapi_Company_Getlist_InputElement().modelObject().execute();
wdComponentAPI.getMessageManager().reportSuccess((new Integer(wdContext.nodeBapi_Company_Getlist_Input().size()).toString()));
catch (Exception ex) {
ex.printStackTrace();
finally {
client.disconnect();
// Invalidates the output context node
wdContext.nodeBapi_Company_Getlist_Input().invalidate();
//@@end
//@@begin javadoc:onActionGo(ServerEvent)
/** Declared validating event handler. */
//@@end
public void onActionGo(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionGo(ServerEvent)
wdThis.wdGetComp_ControllerController().getCompanys();
client.connect();
System.out.println("passo1");
try {
wdContext.currentBapi_Company_Getlist_InputElement().modelObject().execute(); }
catch (Exception ex) {
ex.printStackTrace();
System.out.println(ex);
finally {
client.disconnect();
wdContext.nodeOutput().invalidate();
wdComponentAPI.getMessageManager().reportSuccess((new Integer(wdContext.nodeBapi_Company_Getlist_Input().size()).toString()));
//@@end
//@@begin others
JCO.Client client;
Comp_Model model;
//@@end
Regards.
Taylor.
Edited by: Taylor on Aug 4, 2009 12:46 PM -
my ipod been actin up lately. sometimes im just playing a song and all of a sudden it freezes or turns off. it dont do it often but it do. so im trying to transfer all my songs to my itunes or my computer. i have tried every software out there and it tells me that im missing a plugin. i have restored my ipod and had to start brand new. i have updated my itunes to make sure is not a update issue. i have the latest updates but is stil not doing it. so when i try to transfer the songs manually i go to my computer; my ipod; view folder options and select show hidden files. it dont even show the ipod control folder. it only shows dcim
You need a third-party program to get non-iTunes purchased music off the iPod. Which have you tried? Th good ones cost like TouchCopy and PhoneView. Here are some others:
Copy music from Ipod to new computer...: Apple Support Communities -
Why apple dont accept the issue with the iPhone 6 plus? (Battery)
My mom send me as a gift one iphone 6 plus 64 gb (900 dlls...) and i was so happy, it was like wooow!
but after test my phone etc etc (11 days ago) i notice a VERY UGLY FAST battery draining, and i updated my phone to 8.2
same...
I Went to the apple online assistance chat and follow all the instructions of the girl: same...
i Went to the apple store (genious bar) and they test my battery etc (WOW 100% fine)
and i ask for a phone replacement, they toldme they can replace my phone with a refurbished one, becauae my battery is ok
"Stop using facebook, stop using this, stop using whatever."
Well... I had bettery battery performance on my old iphone 6 (6 hours screen with bright at 75% hard usage) and with this patetic phone i just got 5 hours of screen (100-0) with a very very low usage... And is a 900-950$ phone... I see a lot of people with the same issue, and the same responce by the apple staff, im tired, i dont want another defective phone, that plus is a refurbished phone...
¿why apple dont just accept their fault and replace all the phones, or batteries or whatever now and not in 2 years like with the iphone 5?
im hating so bad my phone, and the apple staff.Coco Man wrote:
Correct, i have a lot of things disabled, location, background refreshing, icloud...
IT have hardware issue, but apple guys cant see it, because they juat aay "nah my test say your phone is OK, so get lost"
You didn't answer my questions. Have you done a reset? Have you done a complete restore and set up the device from scratch? -
Hello, can anyone help Me? I have a problem with the external speaker of my iphone 4s. It works when i get calls, messages etc but nit for any app. The headphone does still work. The volumebuttons also do not show the regular volume bar. Any ideas please?
Clean the iPhone charging port with a clean dry toothbrush. Dust or debris is causing iPhone to believe it is in Dock station.
-
Applet dont show the Components
Hi,
Ive embedded applet in a jsp page. Initially appearance of applet is coming well. After some time during the process of applet , when the browser window is minimized and restored or if we are switching to any other window and coming back to the applet embedded jsp page, the things whatever displayed in applet are vanished because of which behavior of applet could not be recognized.
Ill explain the applet process flow briefly. My applet is for transferring files from local machine to server through FTP concept. To show the progress of file transfer Ive used progress bar with percentage displayed on it. As the files are transferred, progress bar status varies and also the percentage displayed.
Because of the above mentioned problem, the end user could not see the progress bar or anything else displayed in the applet. Problem is with applet behavior only.
Can any body suggest me how to rectify this problem?
Following is the fraction of applet code Ive used.
public class UploadFolderApplet extends javax.swing.JApplet {
private javax.swing.JProgressBar jPB_Progress;
private javax.swing.JPanel jPanel;
private javax.swing.JLabel msglabel;
public void init() {
try
initComponents();
catch (Exception ex)
ex.printStackTrace();
public void start()
System.out.println("start()");
public void stop()
try
System.gc();
System.out.println("stop()");
catch (Exception ee)
System.out.println("The Exception is at line 214 is ===>"+ee);
public void destroy()
try
System.gc();
System.out.println("destroy()");
catch (Exception ee)
System.out.println("The Exception is at line 214 is ===>"+ee);
private void initComponents() {
jPanel = new javax.swing.JPanel();
msglabel = new javax.swing.JLabel();
jPB_Progress = new javax.swing.JProgressBar();
getContentPane().setLayout(null);
jPanel.setLayout(null);
jPanel.setBackground(new java.awt.Color(235, 235, 235));
msglabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jPanel.add(msglabel);
msglabel.setBounds(20, 40, 830, 270);
jPanel.add(jPB_Progress);
jPB_Progress.setBounds(280, 10, 280, 20);
getContentPane().add(jPanel);
jPanel.setBounds(0, 0, 870, 320);
jPB_Progress.setVisible(false);
jPB_Progress.setBackground(new java.awt.Color(255, 255, 255));
jPB_Progress.setForeground(new java.awt.Color(153, 227,155));
public void pageLoad(String projid01,String clientname01,String projectname01,String isbnno01,String isbnext01,String projtype01,String username01)
SwingWorker sw = new SwingWorker() {
protected Object doInBackground() throws Exception {
// this part is executed when user clicks button in jsp page
return null;
// sw.execute();
Thread th = new Thread(sw);
th.start();
th = null;
if(sw.isDone()){
sw = null;
}Following code explains how the applet is embedded in JSP.
<html>
<head
//some script code
<script language='javascript'>
function subForm(clientname,projectname,projid,isbnno,isbnext,projtype)
document.applets.fmsupload.init();
document.applets.fmsupload.start();
document.applets.fmsupload.pageLoad(projid,clientname,projectname,isbnno,isbnext,projtype,uname);
</script>
</head>
<body>
//here some jsp code
<input class="but" name="b" type="button" value="UploadFiles" onclick="return subForm('<%=clientname%>','<%=projectname.toUpperCase()%>','<%=projid%>','<%=isbnno%>','<%=isbnextn%>','<%=projtype%>');" style="font-family: Verdana; font-size: 10pt; font-weight: bold">
<applet name="fmsupload" archive="fmstest.jar" type="applet" code="UploadFolderApplet.class" codebase="./fms/uploadfolders" height="320" width="870">
</body>
</html>can any one please give me the solution.If you are on a Mac, this requires Java SE 6 to compile (64 bit). It's my current understanding that Safari (32 bit) won't display 64 bit applets.
I'm on a Mac, therefore it's pointless for me to try and assist you any more.
Maybe you are looking for
-
Can't See All Folders of External Drive on Network
I recently got my first Mac - a beautiful MacBook, which I love. I switched from a WinXP system. I have loads of photos and iPod videos on an external drive (fairly new), and music on a separate external drive (both are USB). Both are connected to a
-
Flash 6 vs. Flash 7/8 AS1 difference?
Is this behavior documented? It has left me utterly baffled. var a = "string"; if(!a)trace("!a:"+a); Working in the Flash 8 IDE, I get these results: Publish settings - Flash 6 AS1 Output - "!a:string" Publish settings - Flash 7 or 8 AS1 Output - ""
-
Function module to read the expired useful life of asset
Hi, Is there a function module to read the expired useful life of asset. We are using the depriciation start date to calculate the expired useful life of asset, but the fiscal year shift and matching the calendar year with fiscal is causing the logic
-
hi all, The work center will perform transfer posting either with 303,305,306,313,315,316 movement type to move the stock to a specific storage location. The ZMBSU report will be created automatically for the work center to view any open items with m
-
As the Subject points out, I haven't received the points yet and the website says the points are not rewarded until after shipping. I'm just wondering where they are? I have only one account, I logged into the store site prior to purchase, I have o