Use of PropertyChangeListeners in realtime scenario apps
Dear experts,
I always reach at this topic and i feel to ignore this topic.I have used ResourceBundle class also for getting and retreving properties and i feel Bean is useful in JSP as well.But how this code can help me in my applications that are standalone.I mean how can i take benefit ?.I am not looking to make eclipse workbench
where i have to handle so many user interactions for properties.
import java.io.Serializable;
public class Bean implements Serializable
private String name = new String();
private String address = new String();
public void setName(String name)
this.name = name;
public String getName()
return(name);
public void setAddress(String address) {
this.address = address;
public String getAddress(String address) {
return(address);
import java.beans.*;
import java.util.*;
public class ValueChanger implements PropertyChangeListener
private PropertyChangeSupport changeSupport;
Bean b;
ValueChanger()
b = new Bean();
changeSupport = new PropertyChangeSupport(b);
changeSupport.addPropertyChangeListener(this);
changeSupport.firePropertyChange("name", "", "Aditya Sharma" );
changeSupport.firePropertyChange("address", "", "Ghaziabad" );
public void propertyChange(PropertyChangeEvent evt)
String pname = evt.getPropertyName();
System.out.println("Property of "+ pname+ " has changed");
public static void main(String args[])
new ValueChanger();
}
So what if you find,you haven't climbed Pisa tower.This is the revised code.I wonder so bulky codings for most trivial tasks.
import java.beans.*;
import java.util.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class ValueChanger extends JFrame implements PropertyChangeListener,ActionListener,MouseListener
private PropertyChangeSupport changeSupport;
JLabel l_1;
JLabel l_2;
JTextField t1;
JTextField t2;
JButton b1;
Bean b;
String old_t1,old_t2;
ValueChanger()
old_t1 = new String();
old_t2 = new String();
setSize(650,150);
setLayout(new FlowLayout());
l_1 = new JLabel("Name");
l_2 = new JLabel("Address");
t1 = new JTextField(20);
t1.addMouseListener(this);
t2 = new JTextField(25);
t2.addMouseListener(this);
b1 = new JButton("Detect");
b1.addActionListener(this);
add(l_1);
add( t1);
add(l_2);
add(t2);
add(b1);
setVisible(true);
public void propertyChange(PropertyChangeEvent evt)
String pname = evt.getPropertyName();
System.out.println("Property of "+ pname+ " has changed");
System.out.println("Old value = "+evt.getOldValue());
System.out.println("New value = "+evt.getNewValue()+"\n"+"\n");
public void actionPerformed(ActionEvent ev)
Object ob = ev.getSource();
if (ob == b1) {
b = new Bean();
changeSupport = new PropertyChangeSupport(b);
changeSupport.addPropertyChangeListener(this);
changeSupport.firePropertyChange("name", old_t1, t1.getText() );
changeSupport.firePropertyChange("address", old_t2, t2.getText() );
public static void main(String args[])
new ValueChanger();
public void mousePressed(MouseEvent e) {
public void mouseReleased(MouseEvent e) {
public void mouseEntered(MouseEvent e) {
Object ob = e.getSource();
if (ob == t1) {
old_t1 = t1.getText();
if ((ob == t2) ) {
old_t2 = t2.getText();
public void mouseExited(MouseEvent e) {
public void mouseClicked(MouseEvent e) {
}
Similar Messages
-
Just explain me in realtime scenario :-)
Hello,
Can any one explain briefly about oracle statistics..
What is mean by statistics and why we are using?
When and how can we use that?
No documents please .....just explain me in realtime scenario :-)
Thanks in Advance
Gobinathanyou are getting boggled and nothing did you read yours previous thread throughly
Reg : DB tuning
Khurram -
Hi experts i need realtime scenario for declaration of infotype with MODE N at TM in ABAP HR
hi experts i need realtime scenario for declaration of infotype with MODE N at TM in ABAP HR?? can anyone provide the brief explanation?
Hi bharathi.
Find the bellow code .
Tables: pernr.
infotypes: 0001,0002, 2001 mode n, 2007 mode n, 2013.
start-of-selection.
get pernr.
pr-read-all-time-ity pn-begda pn-endda.
write: p0001-pernr, p0001-bukrs, p0001-abkrs,
p0002-nachm, p0002-name1, p0002-vorna.
end-of-selection.
******** in the abouv code should be -ve TM.
for +ve tm we need to use hr_time_results_get.
based on this u can assume ur requirement .
Thanks
Venkat. -
Capture iPhone camera and microphone using QuickTIme in a web based app.
Hi all.
Can I capture video from iPhone's camera and audio from the mic. using QuickTime in a web based app. ? Of course on the iPhone 3G and 3GS. I need this because I want to let users to use the iPhone for a web based video chat. So theoretically my point is to use QuickTime to capture an a/v signal from a Mac camera/mic. or iPhone camera/mic., to encode that a/v signal (QuickTime knows to encode to H.264/AAC right?) and to send the encoded stream to a server. Is this scenario a realistic one? Can it be implemented ? (I don't have any experience in programming with iPhone and Mac...)
Btw. do you know any emulators for iPhone that runs on Windows 7?
Thanks,
TudorHi
See this Thread
Last login date & Time
Kind Regards
Mukesh -
I need Realtime scenarios bapi
hi
i need Realtime scenarios BAPI
anyone send links.
thanksHi,
Suppose a company has users who use VB to key in sales order and they dont have access to SAP.
This VB application must create sales order in SAP.
In such case, VB must call the BAPI to create sales order .
Reward if helpful. -
Hi pals,
I am working with BSP for the past few weeks... I have gone through the tutorials given in the SAP help docs... Can any one send me some realtime scenarios in BSP... it wud be great if u send documentation for some real time scenarios...Welcome to SDN..
There are some realtime scenarios below:
-->In HR, you can use BSP for Employee self service & Manager self service
1. Updating the Address, Bank detail, Tax detail, applying leave using BSP
2. Approving leave, viewing employee absence detail, etc
-->Create sale order, Purchase order using BSP etc.
Hope this will help you.
<b>*Reward each useful answer</b>
Raja T -
I'm part of a family sharing group. How do I use my iTunes balance to purchase apps?
I'm part of a family sharing group, but I have a balance on my iTunes account. How do I use that balance to pay for apps, instead of using the organizers shared payment method?
808LakerFan wrote:
I'm part of a family sharing group, but I have a balance on my iTunes account. How do I use that balance to pay for apps, instead of using the organizers shared payment method?
Laker Fan,
It should be doing it that way. See below for the official Apple description. If it is not working as stated, contact iTunes Customer Service.
Family purchases and payments
After you set up your family, any time a family member initiates a new purchase it will be billed directly to your account unless that family member has gift or store credit. First, their store credit will be used to pay the partial or total bill. The remainder will bill to the family organizer's card. -
I have an apple ID, I'm trying to use this to update and download apps etc. however, whenever I try this, it keeps asking me to use my old ID, which is attached to an email that no longer exists! I can't download or update anything! Help!
You can log out of the currently logged in account by taping on the id in Settings > Store (Settings > iTunes & App Stores on iOS 6) and you can then log back in.
If you updated your existing account with a new email address then that shoud 'refresh' it on it
If you created a new account then any content that you purchased/downloaded via the old account will remain tied to that old account, and only that old account can redownload its content and download updates to its apps. You should be able to update an account's email address via this page : http://appleid.apple.com -
I changed my AppleID a long time ago to an email that I no longer use and I have updates for apps that I can't update because my old email is filled in to where i sign in and it wont let me change it to my new one???
The problem with those two apps is that they are supposed to be in your Apple ID and you didn't set up the Mac properly/completely when you got it.
You might try deleteing them and using OS X Recovery to install them again.
OS X Recovery -
http://support.apple.com/kb/HT4718
After that, before you open any iLife apps go to your Mac App Store account, to the Purchased pane and Accept them into your account. -
hi ! i am using mac air i download from app store IDESKTOP when i open it its delete all my file and folder on my mac, hi ! i am using mac air i download from app store IDESKTOP when i open it its delete all my file and folder on my mac
Here you can contact the developer.
(Notice, I'm posting this line only once. Not 4 times. ) -
When my husband and I first bought our iPhones, I was the only one with an Apple ID (since he never used iTunes). He used my apple id to get apps. Now he has his own ID, but my apple ID email address keeps popping up on his phone when he tries to download an app. We do not want to have all of the same apps on our phones. How can we change the ID on his phone? I already tried going to Settings>iTunes &App Store> and changing the Apple ID to his account email and that did not solve the problem. To make things worse, I recently changed my Apple ID email address (without getting a new ID) and I do not remember my old password (and this is the address that is popping up on his phone). He does not have any music on his phone and all of the Apps that he has are free. Any help you could offer would be great (-:
All apps are forever tied to the Apple ID that bought them. To stop your id from popping up, you need to delete the apps on his phone, and then repurchase them under his account.
-
Process: iTunes [6564]
Path: /Applications/iTunes.app/Contents/MacOS/iTunes
Identifier: com.apple.iTunes
Version: 10.3.1 (10.3.1)
Build Info: iTunes-10315501~1
Code Type: X86 (Native)
Parent Process: launchd [143]
Date/Time: 2011-06-26 09:12:25.888 -0400
OS Version: Mac OS X 10.7 (11A390)
Report Version: 8
Sleep/Wake UUID: 57AD9B95-8923-403C-BDB2-EBBBD4E1F09C
Interval Since Last Report: 40546 sec
Crashes Since Last Report: 6
Per-App Crashes Since Last Report: 5
Anonymous UUID: 0B83B69E-63F7-4197-908B-49A24783F09F
Crashed Thread: 0
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Application Specific Information:
@executable_path/../Frameworks/iPodUpdater.framework/Versions/A/iPodUpdater
Dyld Error Message:
Library not loaded: @executable_path/../Frameworks/iPodUpdater.framework/Versions/A/iPodUpdater
Referenced from: /Applications/iTunes.app/Contents/MacOS/iTunes
Reason: unsafe use of @executable_path in /Applications/iTunes.app/Contents/MacOS/iTunes with restricted binary
Binary Images:
0x1000 - 0xe50ff3 com.apple.iTunes (10.3.1 - 10.3.1) <DA5B3668-53FC-8550-A39C-06EB35AA692F> /Applications/iTunes.app/Contents/MacOS/iTunes
0x8fe00000 - 0x8fe3320b dyld (195 - ???) <33A6763E-295E-3FE1-9594-81B9E296BACC> /usr/lib/dyld
Model: MacBookPro7,1, BootROM MBP71.0039.B0B, 2 processors, Intel Core 2 Duo, 2.4 GHz, 4 GB, SMC 1.62f6
Graphics: NVIDIA GeForce 320M, NVIDIA GeForce 320M, PCI, 256 MB
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1067 MHz, 0x80CE, 0x4D34373142353637334648302D4346382020
Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1067 MHz, 0x80CE, 0x4D34373142353637334648302D4346382020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 5.100.198.11 )
Bluetooth: Version 2.5.0b13, 2 service, 19 devices, 3 incoming serial ports
Serial ATA Device: Hitachi HTS545025B9SA02, 250.06 GB
Serial ATA Device: MATSHITADVD-R UJ-898
USB Device: Internal Memory Card Reader, apple_vendor_id, 0x8403, 0x26100000 / 2
USB Device: Built-in iSight, apple_vendor_id, 0x8507, 0x24600000 / 2
USB Device: BRCM2046 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0x06600000 / 4
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8213, 0x06610000 / 6
USB Device: IR Receiver, apple_vendor_id, 0x8242, 0x06500000 / 3
USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0236, 0x06300000 / 2I have the same problem...
Process: iTunes [498]
Path: /Applications/iTunes.app/Contents/MacOS/iTunes
Identifier: com.apple.iTunes
Version: 10.3.1 (10.3.1)
Build Info: iTunes-10315501~1
Code Type: X86 (Native)
Parent Process: launchd [254]
Date/Time: 2011-06-27 14:23:04.822 -0400
OS Version: Mac OS X 10.7 (11A390)
Report Version: 8
Sleep/Wake UUID: AC114B5B-BBDE-47BE-A34A-73D0CBEC2D1D
Interval Since Last Report: 21605 sec
Crashes Since Last Report: 3
Per-App Crashes Since Last Report: 3
Anonymous UUID: 7CA002EB-2F78-46A8-B8FC-917C420125C9
Crashed Thread: 0
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Application Specific Information:
@executable_path/../Frameworks/iPodUpdater.framework/Versions/A/iPodUpdater
Dyld Error Message:
Library not loaded: @executable_path/../Frameworks/iPodUpdater.framework/Versions/A/iPodUpdater
Referenced from: /Applications/iTunes.app/Contents/MacOS/iTunes
Reason: unsafe use of @executable_path in /Applications/iTunes.app/Contents/MacOS/iTunes with restricted binary
Binary Images:
0x1000 - 0xe50ff3 com.apple.iTunes (10.3.1 - 10.3.1) <DA5B3668-53FC-8550-A39C-06EB35AA692F> /Applications/iTunes.app/Contents/MacOS/iTunes
0x8fe00000 - 0x8fe3320b dyld (195 - ???) <33A6763E-295E-3FE1-9594-81B9E296BACC> /usr/lib/dyld
Model: MacBook4,1, BootROM MB41.00C1.B00, 2 processors, Intel Core 2 Duo, 2.4 GHz, 2 GB, SMC 1.31f1
Graphics: Intel GMA X3100, GMA X3100, Built-In, 144 MB
Memory Module: BANK 0/DIMM0, 1 GB, DDR2 SDRAM, 667 MHz, 0xAD00000000000000, 0x48594D503131325336344350362D59352020
Memory Module: BANK 1/DIMM1, 1 GB, DDR2 SDRAM, 667 MHz, 0xAD00000000000000, 0x48594D503131325336344350362D59352020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x88), Broadcom BCM43xx 1.0 (5.10.131.36.5)
Bluetooth: Version 2.5.0b13, 2 service, 19 devices, 1 incoming serial ports
Network Service: Ethernet, Ethernet, en0
Network Service: AirPort, AirPort, en1
Serial ATA Device: FUJITSU MHY2250BH, 250.06 GB
Parallel ATA Device: HL-DT-ST DVDRW GSA-S10N
USB Device: Built-in iSight, apple_vendor_id, 0x8501, 0xfd400000 / 2
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8205, 0x1a100000 / 2
USB Device: IR Receiver, apple_vendor_id, 0x8242, 0x5d100000 / 2
USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0229, 0x5d200000 / 3 -
On 3/18 I used Firefox to download a translation app called Babylon to my Dell Latitude laptop - running XP Pro. I checked out the app, got all the pop-ups asking me to buy spinoff products & uninstalled Babylon. When I rebooted I couldn't open Firefox.
I started investigating, came up with a weird Pareto Logic UUS error, fixed that. Unistalled Firefox through the Control Panel. Used IE to again download & install latest Firefox. At the end of installation, the dialog box askes "Lauch Firefox now?" which I checked & clicked the Finish button. Nothing happened. I rebooted & tried to launch Firefox from the Start menu, then from the root .exe - no luck. IE launches fine; I just want my Firefox back!i wish i could paste the error message but it is
-
I have an iPad 2 and used old Apple ID for iBook app; now it wants to upgrade iBook but it is "stuck" on my old ID, yet I already created a new ID but it won't let me update the App. I have everything backed up on my MacBook so if I delete iBooks on my iPad and retrieve the App under my new ID and then sync with my MacBook, will I still have all of the books, etc.?
Your purchases are tied to your Apple ID. If you bought all of the books with the old ID then AFAIK you will have to continue to use that ID in order to continue to sync those books to the iPad.
You have to update the app with the old ID so I don't see how you could keep the books with the new ID. Maybe I am wrong about this, but someone else will chime in I'm sure and correct me if I am wrong. -
How do I use transparent=true in my Air app but still displaying swf ?
How do I use transparent=true in my Air app but still displaying swf's files ?
The thing is that I created a customized chrome, and looks nice when it is transparent cause seems to be floating, it works as a browser, but the problem is that when I navigate with it into a page wich contains embedded youtube videos, as in example, or any other swf file... it just doesn't show...
Any help ? thanks in advance,Contact iTunes Support: http://www.apple.com/support/itunes/contact/
Maybe you are looking for
-
When I try to setup my new iPad air, I go through all the steps for the iCloud sign-in and choosing security questions and what not. But after I hit the agree to the terms and conditions... It says Apple ID could not be created because of a server er
-
I need to update my old iPod touch. How can i do that?
my ipod haven't been updated for a long time around 8 month and now i can't download anuthing from the store because it does not have the latest version ios 3 something. can somedoby help me??? please!!! i need to knoe tho steps to fallow to update i
-
Travel Expense workflow status configuration
Hi, A customized WF is used for Travel Expenses with two level of approval after WF request created by Employee. The problem faced is when first level approver approves the request the status visible to employee is "Trip on Hold" Where are it should
-
I want to use sql query in interface mapping. how can i do that?
-
How to get motion to read text from file?
There has to be a way to do this. I have a large file of text (transcripts from a clip several minutes long) and I want to make subtitles using Motion. How can I get Motion to read the file and create a text object with the sentence/line in the file,