PLS give me a small drawing
Hello
PLS give me a small pice of code with a JFrame(in an application) which will have a button and a simple shape(an circle for ex.), (no complicate Layouts, whith setLayout(new FlowLayout()); for ex.).
I'd like that when the button is presed a window( IJFrame, enithing) to come up,and to show an design (another simple drowing).
All exemple keep it so simple as it's posible.
My problem is that I can't figure out drawings whith applications (it works well with JApplets).
THX
P.S.
Sorryt about my English.
THX for answered me.
I think I've solved the problem, myself.
THX all.
package stefanberbece.dealB;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class Test{
public static void main(String[] args){
JFrame myf=new JFrame("TEST Frame");
JButton b1=new JButton("Exit");
JButton b2=new JButton("DEAL");
JPanel p=new JPanel();
Exit al=new Exit();
Deal dl=new Deal();
b2.addActionListener(dl);
b1.addActionListener(al);
p.add(b1);
p.add(b2);
myf.getContentPane().add(p,BorderLayout.CENTER);
myf.setSize(200,200);
myf.setVisible(true);
class Exit implements ActionListener{
public void actionPerformed(ActionEvent e){
int conf=JOptionPane.showOptionDialog
(null,"Relly Exit ?","Exit Confirmation ",
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE,null,null,null);
if(conf==0)System.exit(0);
class Deal implements ActionListener{
public void actionPerformed(ActionEvent e){
final JWindow myw=new JWindow();
myw.getContentPane().add(new Pan(), BorderLayout.CENTER);
JButton b3=new JButton("Bye !");
ActionListener mm=new ActionListener(){
public void actionPerformed(ActionEvent e){myw.dispose();}};
b3.addActionListener(mm);
myw.getContentPane().add(b3, BorderLayout.SOUTH);
myw.setSize(200,200);
myw.setLocation(500,300);
myw.setVisible(true);
class Pan extends JPanel{
public Pan(){
super();}
public void paintComponent(Graphics g){
super.paintComponents(g);
Graphics2D g2 = (Graphics2D) g;
g2.setPaint(Color.red);
g2.setStroke(new BasicStroke(4));
g2.drawOval(50, 30, 30, 30);
g2.drawOval(100, 30, 30, 30);
g.fillOval(60,45,10,10);
g.fillOval(110,45,10,10);
g2.setStroke(new BasicStroke(6));
g2.drawArc(40,60,100,50,-10,-160);
Similar Messages
-
Hello,
Please, give me a pice of code, with a shape on a JFrame(in an application) +an button and a window which will pop up when the button is presed. I'd like also the window to have a shape on it.
THXTHX for answered me.
I think I've solved the problem, myself.
THX all.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class Test{
public static void main(String[] args){
JFrame myf=new JFrame("TEST Frame");
JButton b1=new JButton("Exit");
JButton b2=new JButton("DEAL");
JPanel p=new JPanel();
Exit al=new Exit();
Deal dl=new Deal();
b2.addActionListener(dl);
b1.addActionListener(al);
p.add(b1);
p.add(b2);
myf.getContentPane().add(p,BorderLayout.CENTER);
myf.setSize(200,200);
myf.setVisible(true);
class Exit implements ActionListener{
public void actionPerformed(ActionEvent e){
int conf=JOptionPane.showOptionDialog
(null,"Relly Exit ?","Exit Confirmation ",
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE,null,null,null);
if(conf==0)System.exit(0);
class Deal implements ActionListener{
public void actionPerformed(ActionEvent e){
final JWindow myw=new JWindow();
myw.getContentPane().add(new Pan(), BorderLayout.CENTER);
JButton b3=new JButton("Bye !");
ActionListener mm=new ActionListener(){
public void actionPerformed(ActionEvent e){myw.dispose();}};
b3.addActionListener(mm);
myw.getContentPane().add(b3, BorderLayout.SOUTH);
myw.setSize(200,200);
myw.setLocation(500,300);
myw.setVisible(true);
class Pan extends JPanel{
public Pan(){
super();}
public void paintComponent(Graphics g){
super.paintComponents(g);
Graphics2D g2 = (Graphics2D) g;
g2.setPaint(Color.red);
g2.setStroke(new BasicStroke(4));
g2.drawOval(50, 30, 30, 30);
g2.drawOval(100, 30, 30, 30);
g.fillOval(60,45,10,10);
g.fillOval(110,45,10,10);
g2.setStroke(new BasicStroke(6));
g2.drawArc(40,60,100,50,-10,-160);
-
Pls give for any small narraion
< MODERATOR: Per the forum [rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement], please use an appropriate subject in your message... and ask an appropriate question. Message locked. >
S_ALR_87013346 - Profit Centers: Vendors (Transferred Periodically)
S_ALR_87013345 - Profit Centers: Customers (Transferred Periodically)
S_ALR_87013347 - Profit Centers: Assets (Transferred Periodically)
S_ALR_87013348 - Profit Centers: Materials (Transferred Periodically)Hi,
Refer to sap.help.com regarding the reports
http://help.sap.com/erp2005_ehp_02/helpdata/EN/eb/1376b443c411d1896f0000e8322d00/frameset.htm
Please let me know if you need more information.
Assign points if useful.
Regards
Sridhar M -
Drawing a curved line using the pen tool, dragging the text cursor over the line but will only give me a small area to write in, in-between a circle and a circle with a cross in?
If you change your tool to the "Direct Selection Tool" (A) then you should be able to adjust the area for you to type in...
-
PLs giv me a reply or help me fix this cuz I can't buy anything from game but I can only buy apps
Look, I understand I still need a card attached to the account. The problem is, it won't accept my card because I only have 87 cents in my bank account right now.
If I had known there would be so much trouble with the iTunes card, I would have just put the cash in my bank account in the morning instead of buying an iTunes card (I didn't expect the banks to be open on Thanksgiving of course).
Apple will only accept cards that have a balance. The balance is so small in my account that it won't accept it as a valid card.
I'm going to have to contact Apple anyway to reset the security questions. That's obvious. Your answers were not exactly helpful. You didn't tell me anything I don't already know, but thanks for trying to be helpful. -
HI all pls give me diff btwn upload ws_upload and GUI Upload
HI All,
pls give me difference between
upload
ws_upload and
GUI Upload
Thanks & regards .
Bharat KumarHi,
WS_* Function modules are replaced by GUI_* FMs from 4.7 SAP version.
GUI_* modules have additional parameters when compared with WS_* FMs.
Both FM are used for uploading data .
But ws_upload is obsolete now .
WS_UPLOAD and WS_DOWNLOAD, the function modules used until now are not part of the standard set of ABAP commands. They are used to display the file interface on the presentation server. WS_UPLOAD and WS_DOWNLOAD are not compatible with USs and have been replaced by GUI_UPLOAD and GUI_DOWNLOAD.
The new function modules, GUI_UPLOAD and GUI_DOWNLOAD, have an interface that also allows you to write Unicode format to the local hard drive. For a description of these interfaces, refer to the documentation for each function module, available under SAP Easy Access " Development " Function Builder " Goto " Documentation.
WS_UPLOAD, GUI_UPLOAD FMs are used in BDCs.
WS_UPLOAD loads files from the Presentation Server to Internal ABAP Tables.
This is used upto SAP 4.6 version.
GUI_UPLOAD is used to loads a file from the PC to the server. The data can be
transferred in binary or text format. Numbers and data fields can be
interpreted according to the user settings.
You can check this for some info
http://help.sap.com/saphelp_erp2005/helpdata/en/79/c554a3b3dc11d5993800508b6b8b11/frameset.htm
http://www.sapdevelopment.co.uk/file/file_otherpc.htm
Regards,
Priyanka. -
How to calculate the number of vowels from a txt file. Pls give me a hand!!
Guys! How do i calculate the number of vowels from a txt file? I have to create a program to count the number of words, sentence, and vowels. So far I had managed to count the number of words. Now I need help on counting sentence and vowels! Pls give me a hand guys!
I first have to read from the file not the string.I
know how to read from a file. Now the problem ishow
to compare a character from a txt file!You fail to understand, that you have read the data
from the file into a string. Now loop over all
characters in the string. Forget about the file.
KajOr forget the scanners just as others have told you. Just read the file character by character using a FileReader.
Kaj -
I have hp g series its spyker not working properly pls give me any solution
i have hp pavilion g series. i was listening music first its left spesker turn off and after its both speaker turn off. i have cheaked all settings the all settings are correct pls give me any sollution.
I do not really know much about this kind of problem, but i may be your internet connection.
If you are on your own #G network then:
Go to Settings > then enable "Airplane Mode". Count to 10 and then disable it.
Then wait patiently until you get a good connection and then try again.
If you are on a nearby Wi-Fi connection then:
Go to Settings > Wi-Fi > then disable then enable after counting to 10. Make sure that you are connected and then try again.
If all else fails, then you need to contact your provider for assistance.
Sprint:888-211-4727
AT&T:?
Verizon:? -
Pls give me step by step sequence of Automatic Payment Prog
Hi,
Pls give me step by step sequence of Automatic Payment Program.
Thanks in AdvanceHi,
Automatic Processing : In this processing the system prepares open item to be paid and prepare a payment document & to this payment document the system prepares a cheque with the payment advise note automatically
Configuration of Automatic Payment Program : SPRO - Ref-IMG-FA-A/R&A/P u2013 Business Transaction- Outgoing Payments u2013 Automatic Outgoing Payment u2013 Payment Method/Bank Selection for payment program u2013 Set up all Company codes for payment transactions.(T.Code:FBZP)
New Entries
Company code : 6023
Control data
Paying Company code : 6023
Enter & Save back to menu item
Setup paying Company Code for Payment Transactions :
New entries
Paying Company Code : 6023
Control Data
Minimum amount for incoming payment ________
Minimum amount for outgoing payment 500 INR
Forms
Sender Details
Select Forms
Form for the payment advice u2013 Select International Payment advice Note F_110_IN_AVIS
Save back to menu Item
Setup payment methods per country per payment Transaction :
New Entries
Country IN
Payment method X (any identification No or Alpha)
Description Cheq
Payment method for
u2022 Outgoing payment
Payment method classification * Check
Posting Details
Document type for payment KZ
Clearing Document Type KA
Use classic payment medium programs payment medium program RFFOUS_C
RFFO : Program Code
US : Country
C : Payment
Name of Print dataset : LIST1S
& SAVE Back to menu Item
Setup payment methods per Co code for Payment Transactions
New Entries
Paying Company Code : 6023
Payment Method X
Minimum Amount 500
Maximum Amount 5000000
Select form data
Forms
Form for the payment transfer medium F_110_PRENUM_CHECK
(International u2013 Check (with check management)
Next form
Enter & Save back to menu item
Set up Bank determination for Payment Transaction :
Select Position button
Paying Company Code 6023
Paying Company Code Name
6023 Reliance Infocom
Select Company Code
Select Bank Selection : Ranking Order
New Entries
PAYMENT CURRENCY RANK ORDER HOUSE BANK
X INR 1 6SBI0
X INR 2 6ICIC (NEXT PREFERED BANK)
ENTER & SAVE
Select Bank Accounts
New Entries
HOUSE BANK PAYMENT CURRENCY ACCOUNT ID BANK SUB A/C
6SBI0 X INR 6S002 211002
6ICIC X INR 6I002 211002
If we do not specify currency --- all the currency accepted
Save
Select Available Amounts
New Entries
House Bank Account ID Days Currency Available for O/ Pay
6SBI0 6S002 999 INR 500000
6ICIC 6I002 999 INR 500000
Save & Bank to Menu Item
CHANGE VENDOR MASTER RECORD TO SPECIFY THE PAYMENT METHOD XK02 :
Vendor 1000000
Co Code 6023
Co Code Data
Payment Transactions
Enter
Automatic Payment Transactions
Payment Method X
& Save
lly
For all the Vendor Master Record specify the payment method
Execution of Automatic Payment Program :- Accounting u2013 FA u2013 A/P u2013 Periodic
Processing F-110 u2013 Payments
Enter Run Date : 20-04-2006
Identification Code : YRK00
Select Parameters
Posting Date : 20-04-2006 Doc entered upto 20-04-2006
Payment Control
Company Code Pmt Method Next Posting Date
6023 X 21-04-2006
Accounts
Select Vendor Accounts 1000000 to 3840099
Specify the range of vendors
Save the parameters
Select Status Button
Select Proposal Button
Start immediately
Continue
Press enter key until the system displays a message payment proposal has been created.
To Check Payments List u2013 Select Edit Proposal
Continue
The System displays
Vendor Item PM H.Bank Curr Amount
1000000 2 X 6S002 6SBIO INR 500000-00
To Block the Payment : Double click on the item - again double Click
Block
Payment Block A Blocked for payment
Continue
Select back button
Select exceptional list item u2013 Select Reallocation Block
Payment Method X
House Bank 6ICIC 61002
Continue
Select back button
Save
Select back button
Select Printout/datamedium
From printing/data medium exchange
Program Varient
RFFOAVIS 6023 AVIS
Keep the cursor on first row/Columns Enter
Name : 6023 AVIS
Select maintain Varients
Select Continue Button
Program run date
Paying Co. Code 6023
Number of Sample
u2022 Print immediately
u2022 Select attributes
Varient Name
Meaning Payment advice form
& Save
Select back button
Keep the cursor on 3rd row first column
Program Variant
RFFOAVIS 6023 AVIS
RFFOEDI1
RFFOUS_C 6023SBI (3RD ROW FIRST COLUMN)
Select maintain Variant
Paying Co Code : 6023
Further Selection
Paymethod X
House Bank 6SBI0
Account ID 6S002
Check Lot No : 2
* Print Checks Printer LP01 * Print immediately
* Print Payment Advise Note Printer LP01 * Print immediately
* Print Payment Summery Printer LP01 * Print immediately
Output Control
Number of Sample Printouts 0
Select Attributes Button
Varient Name 6023SBI
Meaning State Bank of India
Save
Select back button
From Printing
Program Variant
RFFOAVIS
RFFOEDI1
EFFOCUS_C 6023 ICICI
Maintain Varient
Paying Co Code : 6023
Further Selections
Payment Method X
House Bank 6 ICIC
Account ID 61002
Check Lot No.2
Print Control
* Print Checks Printer LP01 * Print immediately
* Print Payment Advise Note Printer LP01 * Print immediately
* Print Payment Summery Printer LP01 * Print immediately
Output Control
Number of Sample Printouts 0
Select Attributes Button
Varient Name 6023ICICI
Meaning ICICI
Save
Select back button
Select Status Button
Select Payment Run
Start Date : 20-04-2006 Start immediately
Create Payment medium
Select Continue Button
Press Enter Key until system the display message u2013 payment run has been carried out
Select Printout
Print JOB
JOB NAME F11020060420-YRK00--? 1
To check the job: System u2013 Services u2013 Output u2013Control u2013 Execute
Spool No Type Date Time Status Pg Title Cheque
*1167
Select Display Content Button
*1168 Payment Advice
Post with Print Form :
Accounting u2013 FA u2013 A/P u2013 Document Entry u2013 Outgoing Payment u2013 F-58
Post+Print Form
Payment method and form specifications
Co Code : 6023
Payment Method X
House Bank 6 ICIC
Check Lot No : 2
Alternative Form F110-PRENUM-CHK
Printer
Printer for Forms LP01 * Print immediately
Payment Advice Printer LP01
Enter Payments
Document Date : 20-04-2006
Posting Date : 20-04-2006
Bank Posting details
Amount : 10000
Value Date : 20-04-2006
Payee
Vendor 383001
Select Process Open Items
Select Partial Payment
Simulate
Post
Print Parameters
Output LP01
Number of copies 1
*Continue
The System display-PrintJob was generated System u2013 Services- Output Control
Spool Req Number XXXX
Execute Title
Cheque
u2022 Select Display Content Button -
Iam using Iphone4,my problem is while imake a call or when ia attend a incoming call,the screen doesnt lock,while i kept in my ear to attend a call it automatically gets inside keypad or it on hold tab this makes me uncomfortable pls give a solution
This sometimes happens if you have a case or screen protector on the phone. IF you have one of these remove it and see if it makes any difference
-
Pls give Link.... flash player problem
pls give me the link of the previous flash player that works..
im not a computer expert but its clear as day that something is wrong with the latest (10.1)...
pls...Hi, you can do that, but until the Uninstall is clean, you won't be able to Install the 10.0. It sounds as if you had an application in the system tray that was running when you ran the Uninstaller, since afterwards the 10.1 was still there.
Also, your operating system and browser(s) you use would be helpful.
Thanks
eidnolb -
Pls give me the code to load method only once in JVM.
Hi all,
Pls give me the code to execute method only once in JVM.Even if we create more than one instance to call the method.
Thanks & Regards,
Vinodh[How to ask a question on these forums|http://catb.org/~esr/faqs/smart-questions.html]
-
An unknown error occurred (0x80092013) what the **** is going on from last six month i am unable to access i tune store?pls give me solution which should help me to shortout this problem as soon as possible. i have not expected this from apple
I have been trying for months to put iTunes on my laptop and kept getting installation errors in Windows 7. I gave up and just installed iTunes on my PC running XP.
Now I have to install Quicktime on the laptop and once again I get an installation error 0x800736FD.
All windows updates are fine, none failed.
I have removed all apple software from my laptop using CCleaner, common files and folders. Tried reinstalling and still the same error.
Could you offer any advice on how to get both quicktime and then iTunes working??
Thank you in advance -
I have an urgent question about my indesign. I had problems with the creative cloude app and then uninstalled it and then installed it again. Now it is not opening and I cannot download it again either. Pls give me help and advice if there is anything I can do to repair it
Please authorize ADE 3 with same credentials that you used with older version of ADE
-
Pls give the menu path for pricing schema for PO
Pls give the menu path for pricing schema for PO
Thanx
Vikas ChhabraHi,
we assign account assignment category in PO.Here is the path
IMG>Materials Management>Purchasing>Account Assignment>Maintain Account Assignment Categories OME9
Based on account assignment category you use in PO, it will ask you cost object in PO
E.g P (project) you need to enter G/L and WBS element
N Network G/L and Network
Like in SD account determination, OMWB is MM and FI integration.
Regards,
Chandra
Maybe you are looking for
-
Unable to load pdf docs after loading Adobe Flash Player
I loaded Adobe Flash player today and now I am sorry that I did. When I try to open any pdf documents on my mac I get a message to the affect that I need to lauch adobe reader, accept the terms of the agreement, quit my browser (safari) and relaunch
-
Solman_setup - Solution / Logical Component
hi, I just completed Solman 7.1 upgrade. Currently working on solman_setup. Just realized that the at start the "Specify Solution", it by default used another Logical component and Solution. However, we are using another logical component/solution in
-
I connected my MBP to my television via the HDMI port to watch a movie. Whenever I have a second display connected I have different wallpapers for each screen. After the movie was over I disconnected the cable and started surfing the web, and I alway
-
Recently I put together a new system. Everything is working fine except the video card. It doesn't even work in it stock speed. The system contains : ** Soyo SY-P4S-645DX DRAGON Ultra motherboard ** Intel 1.6A (overclocked at 2.13 GHz, the problem ha
-
How do i fix the shuffle feature for songs?
When I select shuffle, some songs are played many many times and some are never played. How do I fix this?