Need Help I'm Very Woried
Ok so I just recently bought my first apple product a Ipad! I was so excited and as soon as I got home I set it up right away. Here is the problem though, I ACCEPTED TO THE TERMS AND AGREEMENTS WITHOUT READING THEM!! At the moment it seemed fine but then i herd how apple is now putting various things in the terms and agreements and that apple recently turned three people who accepted to the terms and agreements without reading them into a new device they call the "Human CentIpad". It was a aweful sight when I saw it and I am so worried now that I might become this because I did not read the terms and agreements. Anyone have advice how I can advoid being aducted by apple and turned into a "Human CentIpad"?
Some people do. Pretty sure this snippet is still one of the best:
Similar Messages
-
Need help in Idoc--very urgent.
Hi guys,
i am working on an object where i need to post the data from legacy system to F-27 transaction using Idoc.i hv found two idocs input_idoc_fidcc1 and input_idoc_fidcc2 for posting the data..
Can anyone help in finding the right idoc for triggering the f-27 transaction with the reason...
coz both are perfoming almost the same functionalities...
its very urgent guys..
kindly help me full marks wud be given...
regards
SahilHi,
The function module is related to post the idoc type FIDCPP01
and posts the complete FI document. and as coming to second function module along with Tax you can post item wise with holding tax dataalso. So you choose the required function module based on the data you need to post. If you need not post with holding tax details dont fo for second function modules.
Reward if find useful -
Need help with a very simple example. Trying to reference a value
Im very new to Sql Load and have created this very simple example of what I need to do.
I just want to reference the ID column from one table to be inserted into another table as DEV_ID.
Below are my: 1) Control File, 2) Datafile, 3) Table Description, 4) Table Description
1) CONTROL FILE:
LOAD DATA
INFILE 'test.dat'
APPEND
INTO TABLE p_ports
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
DEV_id REF(CONSTANT 'P_DEVICES',NAME),
NAME FILLER ,
PORT_NO
2) DATAFILE:
COMM881-0326ES09,6
3) TABLE DESCRIPTION:
SQL> describe p_ports
Name Null? Type
ID NOT NULL NUMBER(10)
DEV_ID NOT NULL NUMBER(10)
PORT_NO NUMBER(3)hi,
i managed to do this for my app. (think i referred to viewTransitions sample code and modified quite a bit)
i can't remember this well cos i did this quite a while back, but i will try to help as much as possible
1) from the appdelegate i initialize a root controller (view controller class)
2) this root controller actually contains two other view controllers, let's call it viewAController and viewBController, for the screens which u are going to toggle in between. and there's also a function, let's call it toggleMenu, which will set the menus to and fro. i copied this whole chunk from the sample code. it actually defines the code on what to do, i.e. if current view is A switch to B and vice versa.
3) inside the controller files, you need to implement the toggleMenu function too, which basically calls the rootController's toggleMenu
4) we also need viewA and viewB files(view class)
5) need to add the .xib files for the respective views and link them up to the controller class. i did not use the .xib files for ui layout though, because of my app's needs. however, it will not work properly without the .xib files.
5) inside the view class of both views, i.e. viewA.m and viewB.m, you need to create a button, that will call the toggleMenu function inside the respective controller class.
it will look something like this:
[Button addTarget:ViewAController action:@selector(toggleMenu:) forControlEvents:UIControlEventTouchUpInside];
so the flow is really button (in view)-> toggleMenu(viewController) -> toggleMenu(rootController)
i'm sorry it sounds pretty hazy, i did this part weeks before and can't really remember. i hope it helps. -
Need Help with a very simple view transition scenario
Hello All,
I am trying to learn how view transitions work and I am having a very hard time with the sample apps (like transition view app etc)...I need something much more simple at first. Can you please provide me a little guidelines on how to set up this following scenario:
App loads up and shows a title screen with a button that says go. When you click on the go button the title screen fades out and a new view fades in (or slides in, or anything at all).
Right now I have 3 nib files. There is the main one that is called on application start (tied with MainViewController, a subclass of IUViewcontroller just like in the hello world app. After the app loads the app delegate object tells the MainViewController object to load in another view controller object (via addSubview) which is tied with the second nib file; my title screen with the button. When I press the button I was thinking in the IBAction function to tell the MainViewController object to remove (or transition out somehow) the title screen view controller object then add the other view (third nib file in). This is the part I can't get working. Am I on the right track or have a gone hideously astray? Thank you!hi,
i managed to do this for my app. (think i referred to viewTransitions sample code and modified quite a bit)
i can't remember this well cos i did this quite a while back, but i will try to help as much as possible
1) from the appdelegate i initialize a root controller (view controller class)
2) this root controller actually contains two other view controllers, let's call it viewAController and viewBController, for the screens which u are going to toggle in between. and there's also a function, let's call it toggleMenu, which will set the menus to and fro. i copied this whole chunk from the sample code. it actually defines the code on what to do, i.e. if current view is A switch to B and vice versa.
3) inside the controller files, you need to implement the toggleMenu function too, which basically calls the rootController's toggleMenu
4) we also need viewA and viewB files(view class)
5) need to add the .xib files for the respective views and link them up to the controller class. i did not use the .xib files for ui layout though, because of my app's needs. however, it will not work properly without the .xib files.
5) inside the view class of both views, i.e. viewA.m and viewB.m, you need to create a button, that will call the toggleMenu function inside the respective controller class.
it will look something like this:
[Button addTarget:ViewAController action:@selector(toggleMenu:) forControlEvents:UIControlEventTouchUpInside];
so the flow is really button (in view)-> toggleMenu(viewController) -> toggleMenu(rootController)
i'm sorry it sounds pretty hazy, i did this part weeks before and can't really remember. i hope it helps. -
Need help restoring a very slow MBP ... no OS Disc
I have been asked by a colleague to 'sort out' her MacBook Pro.
It has been running increasingly slow and often becomes non-responsive.
Now it is not letting me log into the normal (not administrator) account - accepts password and takes me back to login.
The administrator account wich does not get used has no problem logging in - but is equally as slow.
She doesn't have/can't find the OS discs to reinstall.
Also, when plugging in an ext. HD, Time Machine does not recognise it as an available device... is it safe to manually move files onto the HD?
Someone has suggested creating a new user account, moving files over, deleting old account.
Will this have any impact on the slow running of the MBP in general?
About This Mac:
Mac OS X
Version 10.6.8
Processor 2.66 GHz Intel Core i7
Memory 6GB 1067 MHz DDR3.
I have been waiting for 'Opening System Profiler' to load assuming it will display more information but I have been waiting for 20 mins now.
Please Help!
(I'm relatively new to Mac products, used Windows for years!)You only have 2GB of RAM, which is not enough to run OS X 10.10 smoothly (it's the bare minimum requirement to run it at all). Consider buying more at http://eshop.macsales.com (there are other vendors as well). Find the correct RAM for your model by searching for your iMac's model identifier - iMac8,1. Also look at their installation videos.
You have several failed Apple launch agents, you may need to re-install OS X to fix that. Boot the computer while holding down the Command ⌘ and R keys at the same time. This will boot to the Recovery partition. Choose the reinstall OS X option. -
Need help with a very strange problem
I've been using Macs since the Apple IIe and I haven't seen anything like this. I need some help "diagnosing" where the problem might lie, and what to do about it.
I have the dock to appear and disappear automatically. But when I run the mouse down to the bottom of the screen, it doesn't appear. I have to "click" in that area to get it to appear. Also, when I select a menu in the finder or in an application, and then scroll through the menu items, they do not highlight as they should. I can click on an item to activate it, but they aren't highlighted as I scroll through.
Also, in some applications, windows don't appear and disappear normally as they should. For example, with Adobe Lightroom I have it set up so that the adjustment panels on the left and right automatically appear and disappear. But they aren't doing that anymore.
A restart and permissions repair will temporarily solve the problem, but it inevitably returns (sometimes within an hour, sometimes a few days). I have three users on my computer, and it happens in each user account.
A couple days ago, I did an archive & install. That didn't fix it. Then yesterday I did a full reinstall of Leopard and then used Migration Assistant and Time Machine to migrate my users & applications to the new install. After I repaired permissions and rebooted, the problem was right there again.
It doesn't seem like the problem is with a user account, since all three accounts have it. So why didn't a reinstall of the system fix it? And what can I do now?Althought the behavior is the same in all three accounts, if all are working accounts I would suspect there is something all of them have installed that could be the source of the problem. Try creating a new admin account, and leave it just the way Apple creates it--don't add anything nor modify it in any way. Log into that account and see if it works correctly.
If that account is also misbehaving, try restarting, and when you hear the chime hold down the Shift key so that you boot into Safe Mode (you'll see a notice in the splash screen about being in Safe Mode). The boot will take longer (perhaps even considerably longer) as the system runs disk repair, empties some caches, disables all third party startup items, as well as all Apple startup items not strictly necessary for the machine to run. See the menus and Dock now behave correctly.
Since the problem is evidently somewhat intermittent in nature it may take some patience to discover what is wrong. You might also disconnect everything that didn't come with the Mac, reboot, and use only the Apple keyboard and Apple mouse and run for a bit to see how that works. If you are using a third party mouse that required installing something that would be my guess as a "prime suspect" for the cause of the problems.
Francine
Francine
Schwieder -
Need help with something VERY SIMPLE
I'm brand new to Motion - as if today - but I'm only trying to do some VERY simple motions with photos - a simultaneous zoom in and reposition. What I've been doing is setting the starting key frame at one position (adjusting the x, y) and setting the scale. Then I create a second key frame and adjust the postion and scale. It will do the zoom, but then it re adjusts the starting position. If I readjust the starting key frame, it automatically readjusts the second key frame. I don't get it! Applying the various 'behaviors' doesn't seen to help. Certainly there's something obvious here that I'm missing - as I was able to do this in FCP. For some reason the key frames are not fixed when it comes to position.
hi,
a couple of thoughts?
did you actually set a keyframe for position at the first frame?
Also unless you are parked right on a keyframe or have the record button on, if you adjust a value, all the values for all keyframes adjust accordingly. I often mess something up because I wasnt parked on a keyframe.
hth
adam -
I have 400 GB of photos in iPhoto and simply want to back them up. I have a 1TB external hard drive and am wondering what is the simplest way to do this. Can I save the photos to the External Drive and them delete them from iPhoto? I need to free up space on the internal drive. Thanks
You can use Time Machine to backup, that does not mean that you can delete photos from iPhoto to save space however.
Plug the drive into your Mac and turn Time Machine on, that is all you need to do as far as backup is concerned.
You will need a second drive for your iPhoto library if you wish to keep access to all photo's, all of the time. -
Need help getting a very simple RMI program running
I've been pulling my hair out trying to get RMI running on windows. I decided to do a verbatim copy of a tutorial to see if it would work, well it didn't. Here is the sample code:
//HelloInterface.java - located in dir c:\java
import java.rmi.*;
public interface HelloInterface extends Remote {
public String say() throws RemoteException;
//Hello.java - located in c:\java
import java.rmi.*;
import java.rmi.server.*;
public class Hello extends UnicastRemoteObject implements HelloInterface {
private String message;
public Hello (String msg) throws RemoteException {
message = msg;
public String say() throws RemoteException {
return message;
//HelloServer.java - located in c:\java
import java.rmi.*;
import java.rmi.Naming;
public class HelloServer{
public static void main (String[] argv) {
try {
Naming.rebind ("Hello", new Hello ("Hello, world!"));
System.out.println ("Hello Server is ready.");
} catch (Exception e) {
System.out.println ("Hello Server failed: " + e);
Then I open a command prompt and go to c:\java and type:
C:\java>javac HelloInterface.java
C:\java>javac Hello.java
C:\java>rmic Hello
C:\java>javac HelloServer.java
I then open a second command prompt and navigate to c:\registry to (to avoid being in the same directory as the stub files) and type:
C:\register>C:\j2sdk1.4.2_03\bin\rmiregistry
In the original command prompt, I then run HelloServer. I've tried running it a 100 different ways and always get the same error:
Hello Server failed: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: Hello_Stub
I've tried just running it as:
java HelloServer
java -classpath . HelloServer
C:\java>java -Djava.rmi.server.codebase=http://localhost -classpath . HelloServer
C:\java>java -Djava.security.policy=..\policy.all -Djava.rmi.server.codebase=http://localhost -classpath . HelloServer
Where policy.all is:
grant {
permission java.security.AllPermission;
And pretty much just about every combination of the above that you can think of.//HelloInterface.java - located in dir c:\java
import java.rmi.*;
public interface HelloInterface extends Remote {
public String say() throws RemoteException;
}//Hello.java - located in c:\java
import java.rmi.*;
import java.rmi.server.*;
public class Hello extends UnicastRemoteObject implements HelloInterface {
private String message;
public Hello (String msg) throws RemoteException {
message = msg;
public String say() throws RemoteException {
return message;
}//HelloServer.java - located in c:\java
import java.rmi.*;
import java.rmi.Naming;
public class HelloServer{
public static void main (String[] argv) {
try {
Naming.rebind ("Hello", new Hello ("Hello, world!"));
System.out.println ("Hello Server is ready.");
} catch (Exception e) {
System.out.println ("Hello Server failed: " + e);
}I'm not sure what you are saying about the CLASSPATH. I thought rmiregistry had to be ran in a different directory than the stub files and that the stubs shouldn't be in the CLASSPATH of the terminal launching rmiregistry.
The HelloServer is being ran with the -classpath option set to "." and the stubs are in the same directory. -
URGENT: Need help reading URL of current page
Hello kind people!
I need help, and its very simple:
How do i read the URL of a web page?
For example, the URL of this page is:
http://forums.sun.com/thread.jspa?threadID=5327796
So how can i be able to read in this URL in my java program?
thanks SO MUCH
P.S. I HAVE searched the java docs and everything, the closest thing i found was request.getRequestURL().? but i have no idea how to use it. you have NO IDEA how appreciative i would be if you could simply show me exactly how to read in the URL of a given page.
thanks SO MUCH
Edited by: homegrownpeas on Aug 31, 2008 5:19 PMGoing by what I understand here is a simple version of how you can read data from over HTTP.
This expects the "page" to be text (hence an InputStreamReader instead of an InputStream.)
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.HashMap;
* GPLv2.
* @author karlm816
public class HomeGrownPeas {
* @param args
public static void main(String[] args) {
HashMap<String, String> params = new HashMap<String, String>();
params.put("threadID", "5327796");
System.out.println(loadHttpPage("http://forums.sun.com/thread.jspa", params));
public static String loadHttpPage(String sUrl, HashMap<String, String> params) {
// Build the HTTP request string
StringBuilder sb = new StringBuilder();
if (params != null) {
for (String key : params.keySet()) {
if (sb.length() > 0) {
sb.append("&");
sb.append(key);
sb.append("=");
sb.append(params.get(key));
System.out.println("params: " + sb.toString());
try {
URL url = new URL(sUrl);
URLConnection connection = url.openConnection();
connection.setDoOutput(true);
connection.setRequestProperty("Content-Length", "" + sb.length());
connection.setUseCaches(false);
if (connection instanceof HttpURLConnection) {
HttpURLConnection conn = (HttpURLConnection) connection;
conn.setRequestMethod("POST");
OutputStreamWriter osw = new OutputStreamWriter(connection.getOutputStream());
osw.write(sb.toString());
osw.close();
// Now use sb to hold the resutls from the request
sb = new StringBuilder();
BufferedReader in = new BufferedReader(
new InputStreamReader(
connection.getInputStream()));
String s;
while ((s = in.readLine()) != null) {
sb.append(s);
// To make it more "human readable"
sb.append("\n");
in.close();
} catch (IOException e) {
e.printStackTrace();
return null;
return sb.toString();
} -
I have a hp a6814y computer and need help with a graphics card
okay i wanna upgrade my hp with an actual graphics card, so i can play games without it lagging. i mainly play rts games, like command and conquer generals, etc and about to get company of heros. now i need to know what kind of card i can put in this computer. i would like to put this one in
http://www.newegg.com/Product/Product.aspx?Item=N82E16814102824
i hear people say the min is 300watts and some say 450watts. but then idk, if this card can hook up to my power supplie.
i just need help getting a very good card for this computer without updating the power supplieHi,
Check with Athena as they maintain a PC Cross Reference list and see if the power supply that you have selected is compatible with your PC.
HP DV9700, t9300, Nvidia 8600, 4GB, Crucial C300 128GB SSD
HP Photosmart Premium C309G, HP Photosmart 6520
HP Touchpad, HP Chromebook 11
Custom i7-4770k,Z-87, 8GB, Vertex 3 SSD, Samsung EVO SSD, Corsair HX650,GTX 760
Custom i7-4790k,Z-97, 16GB, Vertex 3 SSD, Plextor M.2 SSD, Samsung EVO SSD, Corsair HX650, GTX 660TI
Windows 7/8 UEFI/Legacy mode, MBR/GPT -
I need help with the strereo mix in my pc ,
Hello everyone
I have HP Probook model: 4540s, and my operational system is Windows 7 professional 32bits ( 6,1 version 7600 ) ,
my probleme is i can't find the stereo mix anywhere i have tried installing the realtek high definition audio driver but still nothing , so please help me what should i do i really need help .
thank you very much
Regards
Philipe,Hi Passepartout,
I am sorry, but to get your issue more exposure I would suggest posting it in the Commercial Forums since this is a commercial product or Business product. You can do this at http://h30499.www3.hp.com/hpeb/
Here is a link to your product and troubleshooting.
http://h20565.www2.hp.com/portal/site/hpsc/public/psi/swdHome/?cc=us&cc=us&lang=en&lang=en&sp4ts.oid...
Thanks.
Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping! -
Need help, MMC tree got deleted, very urgent.
Hi,
My sap MMC tree, got deleted in the server. I have been trying to restore since 2 days and couldnt succeed, please help me.
1) i have uncared the sapmmc.sar from Kernal\NT\I386\MMC\sapmmc.sar file
2) i got about 7 files, in which there is one sapmmc file i have tried to double click it, n check but no go.
3) i also tried to run the Sapstartsrv.exe file and fill in up the values in pop up window. & filled up the following values :-
SID: DEV
NR: 00
StartProfile: (entire start profile path given)
user: devadm
passwd; (given)
- but it says "the account name is invalid or does not exist or the password is invalid for account name specified"/
- no go in both the cases.
Please need help very urgent.
Regards,
Satish.siva,
I am getting same error since 2 days
SID: DEV
NR: 00
Start Profile: (entire start profile path)
User: <hostname>/devadm
passwd: ****
Error:
cannot install service
create service failed:421
The account name is invalid or doesnot exist, or the passwd is invalid for the account name specified.
Edited by: satish c on Jun 4, 2008 11:12 AM -
Warning this is very long code but i need help to see if I am on right trac
I have done all the following code myself and it is the buisiness layer for my application. I have tried to follow recommendations on previous posts and I would like to be told where I can clean up my code and how? This is not complete and it looks very long to me but I need help in order to be better. There are 4 button vlivks and I have not completed them all. The criteria for application is that phonebook will accept new entries if they have names surnames and phone numbers that are not longer than 10 characters for display purposes but can change this. No duplicates are allowed. No editing of a existing entry must lead to a duplicate entry either. No new entry or edit may result in a new contact having no phone numbers.
Many thanks for your time in advance,.....
import javax.swing.JOptionPane;
import java.util.ArrayList;
public class Contact
{// Start of the Contact class
ArrayList<ContactDetails> phoneList = new ArrayList<ContactDetails>(); // To hold all the contacts
ArrayList<ContactDetails> searchList = new ArrayList<ContactDetails>(); // To hold all contacts that return true on search
ArrayList<ContactDetails> list = new ArrayList<ContactDetails>();
String newName; // To hold the new name
String newSurname; // to hold the new surname
String newHome; // To hold the new home number if any
String newWork; // To hold the new work number
String newCell; // To hold the new cell number
final int MAX_LENGTH = 10;
public boolean addToPhoneList; // Sets to false if there is an invalid entry
public boolean addToSearchList; // Sets to false if there is an invlid search
public boolean modifyContact; // Sets to false if there is an invalid modification
// Method to create a new contact
public void createNew()
{// Start of create new()
addToPhoneList = true; // Set boolean to true each time the method is executed
getNewContactsName(); // Get new name
if(addToPhoneList == false)
createNew();
return;
getNewContactsSurname(); //Get new surname
if(addToPhoneList == false)
createNew();
return;
String checkName = newName; //Creates copies to be used in the checkIfDuplicate method
String checkSurname = newSurname;
addToPhoneList = checkIfDuplicate(checkName, checkSurname); //Check if the entries are duplicate
if(addToPhoneList == false)
createNew();
return;
getNewContactsHomeNum(); // Get new home number
if(addToPhoneList == false)
createNew();
return;
getNewContactsWorkNum(); // Get new work number
if(addToPhoneList == false)
createNew();
return;
getNewContactsCellNum(); // Get new cell number
if(addToPhoneList == false)
createNew();
return;
checkAtLeastOneNumEntered(); // Check that at least one phone number was entered
if(addToPhoneList == true)
updateListWithNew();
}// End of createNew()
// Method to search for an existing contact
public void searchExisting()
{// Start of searchExisting()
addToSearchList = true; // Set the boolean true
searchList.clear(); // Clear list from any previous searches
if(phoneList.size() > 0) // Check if any contacts are in the list
getExistingDetailsAndSearch(); // If there are entries then continue to search
else
JOptionPane.showMessageDialog(null,"There are no contacts to search for. Please use this option when you have added a contact to the list.","Error",JOptionPane.ERROR_MESSAGE);
}// End of searchExisting()
// Method to modify an existing contact
public void modifyExisting()
{// Start of modifyExisting()
modifyContact = true; // Set the boolean to true
if(phoneList.size() <= 0) // Check if the phonelist is not empty
JOptionPane.showMessageDialog(null,"There are no contacts to modify. Please use this option when there have been contacts added to the list.","Error",JOptionPane.ERROR_MESSAGE);
else
getExistingDetailsAndModify(); // If phonelist not emty continue to modify method
}// End of modifyExisting()
//Method to delete a contact from the list
public void deleteExisting()
//Method to get new contacts name
public void getNewContactsName()
newName = JOptionPane.showInputDialog("Please enter the new contacts name or press cancel to exit without saving.");
if(newName == null)
finish();
if(newName.trim().length()<=0)
JOptionPane.showMessageDialog(null,"You have not entered a name. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
addToPhoneList = false;
return;
addToPhoneList = checkLengthValid(newName, "name");
//Method to get a new contacts surname
public void getNewContactsSurname()
newSurname = JOptionPane.showInputDialog("Please enter the new contacts surnname or press cancel to exit without saving.");
if(newSurname == null)
finish();
addToPhoneList = checkLengthValid(newSurname, "surname");
//Method to get a new contacts home number
public void getNewContactsHomeNum()
newHome = JOptionPane.showInputDialog("Please enter the new contacts home number or press cancel to exit without saving.");
if(newHome == null)
finish();
if(newHome.trim().length() > 0)
try
Long homeNum = Long.parseLong(newHome);
catch(Exception e)
JOptionPane.showMessageDialog(null,"You may only use numbers for a valid phone number. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
addToPhoneList = false;
return;
addToPhoneList = checkLengthValid(newHome, "home number");
//Method to get a new contacst work number
public void getNewContactsWorkNum()
newWork = JOptionPane.showInputDialog("Please enter the new contacts work number or press cancel to exit without saving");
if(newWork == null)
finish();
if(newWork.trim().length()> 0)
try
Long workNum = Long.parseLong(newWork);
catch(Exception e)
JOptionPane.showMessageDialog(null,"You may only use numbers for a valid number. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
addToPhoneList = false;
return;
addToPhoneList = checkLengthValid(newWork, "work number");
//Method to get a new contacts cell number
public void getNewContactsCellNum()
newCell = JOptionPane.showInputDialog("Please enter the new contacts cell number or press cancel to exit without saving");
if(newCell == null)
finish();
if(newCell.trim().length() > 0)
try
Long cellNum = Long.parseLong(newCell);
catch(Exception e)
JOptionPane.showMessageDialog(null,"You may only use numbers for a valid number. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
addToPhoneList = false;
return;
addToPhoneList = checkLengthValid(newCell, "cell number");
//Method to get the details for an existing contact
public void getExistingDetailsAndSearch()
String existingName = getExistingName("search for");
if(existingName == null)
addToSearchList = false;
return;
if(existingName.length()<=0)
JOptionPane.showMessageDialog(null,"You have not entered a name please try again","Error",JOptionPane.ERROR_MESSAGE);
addToSearchList = false;
searchExisting();
String existingSurname = getExistingSurname();
if(existingSurname == null)
return;
if(addToSearchList == true)
searchAndAddIfFound(existingName, existingSurname);
//Method to get existing details and modify contact
public void getExistingDetailsAndModify()
String existingName = getExistingName("modify");
if(existingName == null)
modifyContact = false;
return;
if(existingName.length()<=0)
JOptionPane.showMessageDialog(null,"You have not entered a name please try again","Error",JOptionPane.ERROR_MESSAGE);
modifyContact = false;
modifyExisting();
String existingSurname = getExistingSurname();
if(existingSurname == null)
return;
if(modifyContact == true)
getContactBySearch(existingName.trim().toUpperCase(), existingSurname.trim().toUpperCase());
//Method to get the contact from list and modify details
public void getContactBySearch(String currentName, String currentSurname)
int count = 0;
int numFound = 0;
for(ContactDetails cd: phoneList)
cd = phoneList.get(count);
if((cd.name.equals(currentName))&&(cd.surname.equals(currentSurname)))
numFound ++;
changeDetails(cd);
count ++;
if(numFound <= 0)
JOptionPane.showMessageDialog(null,"No contacts matching the name and surname you entered found. Press the modify button to try again.","Information",JOptionPane.INFORMATION_MESSAGE);
//Method to get existing contacts name
public String getExistingName(String whatWasClicked)
String name = JOptionPane.showInputDialog("Please enter the contacts name that you wish to "+whatWasClicked);
return name;
//Method to get an existing contacts surname
public String getExistingSurname()
String surname = JOptionPane.showInputDialog("Please enter the contacts surname.");
return surname;
//Method to change the details of contact
public void changeDetails(ContactDetails conToChange)
String currentName = conToChange.name;
String currentSurname = conToChange.surname;
String currentHome = conToChange.home;
String currentWork = conToChange.work;
String currentCell = conToChange.cell;
String newNameForContact = getNewModName(currentName);
if(modifyContact == false)
modifyExisting();
return;
String newSurnameForContact = getNewModSurname(currentSurname);
if(modifyContact == false)
modifyExisting();
return;
String newHomeForContact = getNewModHome(currentHome);
if(modifyContact == false)
modifyExisting();
return;
String newWorkForContact = getNewModWork(currentWork);
if(modifyContact == false)
modifyExisting();
return;
String newCellForContact = getNewModCell(currentCell);
if(modifyContact == false)
modifyExisting();
return;
if(modifyContact == true)
conToChange.name = newNameForContact;
//Method to get the modified name
public String getNewModName(String currentName)
String newModifiedName = JOptionPane.showInputDialog("Please enter the new name for contact or press cancel to keep it as is.");
if(newModifiedName == null)
return currentName;
if(newModifiedName.trim().length() <= 0)
JOptionPane.showMessageDialog(null,"You may not replace the existing name with a blank name. Please try again.","Error",JOptionPane.ERROR_MESSAGE);
modifyContact = false;
return currentName;
modifyContact = checkLengthValid(newModifiedName, "modified name");
return newModifiedName;
//Method to get the modified surname
public String getNewModSurname(String currentSurname)
String newModifiedSurname = JOptionPane.showInputDialog("Please enter the new surname for the contact or press cancel to keep it as is.");
if(newModifiedSurname == null)
return currentSurname;
modifyContact = checkLengthValid(newModifiedSurname, "modified surname");
if(modifyContact == false)
JOptionPane.showMessageDialog(null,"Surname not changed.","Information",JOptionPane.INFORMATION_MESSAGE);
return currentSurname;
modifyContact = checkLengthValid(newModifiedSurname, "modified surname");
return newModifiedSurname;
//Method to search and update the list with a succesfull search
private void searchAndAddIfFound(String name, String surname)
int count = 0;
int numFound = 0;
for(ContactDetails cd: phoneList)
cd = phoneList.get(count);
if(cd.name.equals(name.trim().toUpperCase()))
numFound ++;
searchList.add(cd);
count ++;
if(numFound <= 0)
JOptionPane.showMessageDialog(null,"No contacts were found matching the dat you entered.","Information",JOptionPane.INFORMATION_MESSAGE);
else
list.clear();
list.addAll(searchList);
//Method that check all entries are a valid logical length
//Method is based on assumption that a normal name, surname, and phone numbers are not longer than 10 characters long.
//IF This method is changed please change the layout in the GUI as this is also set to fit with the layout that gives a neat //apperance
private boolean checkLengthValid(String detailEntered, String whatWasEntered)
boolean validLength = true;
if(detailEntered.trim().length() >= MAX_LENGTH)
JOptionPane.showMessageDialog(null,"The " +whatWasEntered+" you entered is too long. Please try again and use a "+whatWasEntered+" that is less than "+MAX_LENGTH+" characters long.","Error",JOptionPane.ERROR_MESSAGE);
validLength = false;
return validLength;
private void finish()
System.exit(0);
//Method to update the list with a new entry
private void updateListWithNew()
try
ContactDetails cd = new ContactDetails();
cd.name = newName.trim().toUpperCase();
cd.surname = newSurname.trim().toUpperCase();
cd.home = newHome.trim();
cd.work = newWork.trim();
cd.cell = newCell.trim();
phoneList.add(cd);
JOptionPane.showMessageDialog(null,"Contact succesfully entered. To save this change press exit to save or use the save option in the toolbar menu.","Information",JOptionPane.INFORMATION_MESSAGE);
catch(Exception e)
JOptionPane.showMessageDialog(null,"Failed to add contact to list. If problem persists please contact the software developer.","Error",JOptionPane.ERROR_MESSAGE);
list.clear();
list.addAll(phoneList);
//Method to check for duplicate
public boolean checkIfDuplicate(String nameToCheck, String surnameToCheck)
int count = 0;
boolean valid = true;
for(ContactDetails cd : phoneList)
cd = phoneList.get(count);
if(((nameToCheck.trim().toUpperCase()).equals(cd.name))&&((surnameToCheck.trim().toUpperCase()).equals(cd.surname)))
JOptionPane.showMessageDialog(null,"You may not enter a duplicate contact. Please try again and change the name and surname.","Error",JOptionPane.ERROR_MESSAGE);
valid = false;
break;
count ++;
return valid;
//Method to check that at least one phone number exists for contact
public void checkAtLeastOneNumEntered()
if((newHome.trim().length()<=0)&&(newWork.trim().length()<=0)&&(newCell.trim().length()<=0))
JOptionPane.showMessageDialog(null,"You have not entered any phone number at all. You must enter at least one phone number for a new contact.","Error",JOptionPane.ERROR_MESSAGE);
addToPhoneList = false;
//Method that returns the list to the GUI
public ArrayList<ContactDetails> getList()
return list;
}Should I start over from scratch? Can I get help with links to tutorials on following? How to create a java CRUD application (google not useful) and how to layer in java(google not useful)
This is my pres layer as is is this wrong too?
Filename: ContactsListInterface.java
Date: 16 March 2008
Programmer: Yucca Nel
Purpose: Provides a GUI for entering names and contact numbers into a telephone directory.
Also allows options for searching for a specific name and deleting of data from the record
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.text.*;
import java.io.*;
import java.util.*;
import java.text.*;
public class Phonebook1 extends JFrame implements ActionListener
{ //start of class
// construct fields, buttons, labels,text boxes, ArrayLists etc
JTextPane displayPane = new JTextPane();
JLabel listOfContacts = new JLabel("List Of Contacts"); // creates a label for the scrollpane
JButton createButton = new JButton("Create");
JButton searchButton = new JButton("Search");
JButton modifyButton = new JButton("Modify");
JButton deleteButton = new JButton("Delete");
Contact c = new Contact();
ArrayList<ContactDetails> contactList = c.getList();
// create an instance of the ContactsListInterface
public Phonebook1()
{ // start of cli()
super("Phonebook Interface");
} // end of cli()
public JMenuBar createMenuBar()
{ // start of the createMenuBar()
// construct and populate a menu bar
JMenuBar mnuBar = new JMenuBar(); // creates a menu bar
setJMenuBar(mnuBar);
JMenu mnuFile = new JMenu("File",true); // creates a file menu in the menu bar which is visible
mnuFile.setMnemonic(KeyEvent.VK_F);
mnuFile.setDisplayedMnemonicIndex(0);
mnuFile.setToolTipText("File Options");
mnuBar.add(mnuFile);
JMenuItem mnuFileExit = new JMenuItem("Save And Exit"); // creates an exit option in the file menu
mnuFileExit.setMnemonic(KeyEvent.VK_X);
mnuFileExit.setDisplayedMnemonicIndex(1);
mnuFileExit.setToolTipText("Close Application");
mnuFile.add(mnuFileExit);
mnuFileExit.setActionCommand("Exit");
mnuFileExit.addActionListener(this);
JMenu mnuEdit = new JMenu("Edit",true); // creates a menu for editing options
mnuEdit.setMnemonic(KeyEvent.VK_E);
mnuEdit.setDisplayedMnemonicIndex(0);
mnuEdit.setToolTipText("Edit Options");
mnuBar.add(mnuEdit);
JMenu mnuEditSort = new JMenu("Sort",true); // creates an option for sorting entries
mnuEditSort.setMnemonic(KeyEvent.VK_S);
mnuEditSort.setDisplayedMnemonicIndex(0);
mnuEdit.add(mnuEditSort);
JMenuItem mnuEditSortByName = new JMenuItem("Sort By Name"); // to sort entries by name
mnuEditSortByName.setMnemonic(KeyEvent.VK_N);
mnuEditSortByName.setDisplayedMnemonicIndex(8);
mnuEditSortByName.setToolTipText("Sort entries by first name");
mnuEditSortByName.setActionCommand("Name");
mnuEditSortByName.addActionListener(this);
mnuEditSort.add(mnuEditSortByName);
JMenuItem mnuEditSortBySurname = new JMenuItem("Sort By Surname"); // to sort entries by surname
mnuEditSortBySurname.setMnemonic(KeyEvent.VK_R);
mnuEditSortBySurname.setDisplayedMnemonicIndex(10);
mnuEditSortBySurname.setToolTipText("Sort entries by surname");
mnuEditSortBySurname.setActionCommand("Surname");
mnuEditSortBySurname.addActionListener(this);
mnuEditSort.add(mnuEditSortBySurname);
JMenu mnuHelp = new JMenu("Help",true); // creates a menu for help options
mnuHelp.setMnemonic(KeyEvent.VK_H);
mnuHelp.setDisplayedMnemonicIndex(0);
mnuHelp.setToolTipText("Help options");
mnuBar.add(mnuHelp);
JMenuItem mnuHelpHelp = new JMenuItem("Help"); // creates a help option for help topic
mnuHelpHelp.setMnemonic(KeyEvent.VK_P);
mnuHelpHelp.setDisplayedMnemonicIndex(3);
mnuHelpHelp.setToolTipText("Help Topic");
mnuHelpHelp.setActionCommand("Help");
mnuHelpHelp.addActionListener(this);
mnuHelp.add(mnuHelpHelp);
JMenuItem mnuHelpAbout = new JMenuItem("About"); // creates a about option for info about api
mnuHelpAbout.setMnemonic(KeyEvent.VK_T);
mnuHelpAbout.setDisplayedMnemonicIndex(4);
mnuHelpAbout.setToolTipText("About this program");
mnuHelpAbout.setActionCommand("About");
mnuHelpAbout.addActionListener(this);
mnuHelp.add(mnuHelpAbout);
return mnuBar;
} // end of the createMenuBar()
// create the content pane
public Container createContentPane()
{ // start of createContentPane()
//construct and populate panels and content pane
JPanel labelPanel = new JPanel(); // panel is only used to put the label for the textpane in
labelPanel.setLayout(new FlowLayout());
labelPanel.add(listOfContacts);
JPanel displayPanel = new JPanel();// panel is used to display all the contacts and thier numbers
setTabsAndStyles(displayPane);
displayPane = addTextToTextPane();
displayPane.setEditable(false);
JScrollPane scrollPane = new JScrollPane(displayPane);
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); // pane is scrollable vertically
scrollPane.setWheelScrollingEnabled(true);// pane is scrollable by use of the mouse wheel
scrollPane.setPreferredSize(new Dimension(400,320));
displayPanel.add(scrollPane);
JPanel workPanel = new JPanel();// panel is used to enter, edit and delete data
workPanel.setLayout(new FlowLayout());
workPanel.add(createButton);
createButton.setToolTipText("Create a new entry");
createButton.addActionListener(this);
workPanel.add(searchButton);
searchButton.setToolTipText("Search for an entry by name number or surname");
searchButton.addActionListener(this);
workPanel.add(modifyButton);
modifyButton.setToolTipText("Modify an existing entry");
modifyButton.addActionListener(this);
workPanel.add(deleteButton);
deleteButton.setToolTipText("Delete an existing entry");
deleteButton.addActionListener(this);
labelPanel.setBackground(Color.red);
displayPanel.setBackground(Color.red);
workPanel.setBackground(Color.red);
// create container and set attributes
Container c = getContentPane();
c.setLayout(new BorderLayout(30,30));
c.add(labelPanel,BorderLayout.NORTH);
c.add(displayPanel,BorderLayout.CENTER);
c.add(workPanel,BorderLayout.SOUTH);
c.setBackground(Color.red);
// add a listener for the window closing and save
addWindowListener(
new WindowAdapter()
public void windowClosing(WindowEvent e)
int answer = JOptionPane.showConfirmDialog(null,"Are you sure you would like to save all changes and exit?","File submission",JOptionPane.YES_NO_OPTION);
if(answer == JOptionPane.YES_OPTION)
System.exit(0);
return c;
} // end of createContentPane()
protected void setTabsAndStyles(JTextPane displayPane)
{ // Start of setTabsAndStyles()
// set Font style
Style fontStyle = StyleContext.getDefaultStyleContext().getStyle(StyleContext.DEFAULT_STYLE);
Style regular = displayPane.addStyle("regular", fontStyle);
StyleConstants.setFontFamily(fontStyle, "SansSerif");
Style s = displayPane.addStyle("bold", regular);
StyleConstants.setBold(s,true);
} // End of setTabsAndStyles()
public JTextPane addTextToTextPane()
{ // start of addTextToTextPane()
int numberOfEntries = contactList.size();
int count = 0;
Document doc = displayPane.getDocument();
try
{ // start of tryblock
// clear previous text
doc.remove(0,doc.getLength());
// insert titles of columns
doc.insertString(0,"NAME\tSURNAME\tHOME NO\tWORK NO\tCELL NO\n",displayPane.getStyle("bold"));
for(ContactDetails cd : contactList)
cd = contactList.get(count);
doc.insertString(doc.getLength(),cd.name+"\t"+cd.surname+"\t"+cd.home+"\t"+cd.work+"\t"+cd.cell+"\n",displayPane.getStyle("regular"));
count ++;
} // end of try block
catch(BadLocationException ble)
{ // start of ble exception handler
System.err.println("Could not insert text.");
} // end of ble exception handler
return displayPane;
} // end of addTextToTextPane()
// code to process user clicks
public void actionPerformed(ActionEvent e)
{ // start of actionPerformed()
String arg = e.getActionCommand();
// user clicks create button
if(arg.equals("Create"))
c.createNew(); // method to create a new Contact
addTextToTextPane();
if(arg.equals("Search"))
c.searchExisting(); // method to search for an existing entry
addTextToTextPane();
if(arg.equals("Modify"))
c.modifyExisting(); // method to modify contact
addTextToTextPane();
if(arg.equals("Delete"))
c.deleteExisting();
addTextToTextPane();
if(arg.equals("Exit"))
} // end of actionPerformed()
// method to create a new contact
public static void main(String[] args)
{ // start of main()
// Set look and feel of interface
try
{ // start of try block
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
} // end of try block
catch(Exception e)
{ // start of catch block
JOptionPane.showMessageDialog(null,"There was an error in setting the look and feel of this application","Error",JOptionPane.INFORMATION_MESSAGE);
} // end of catch block
Phonebook1 pb = new Phonebook1();
pb.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
pb.setJMenuBar(pb.createMenuBar());
pb.setContentPane(pb.createContentPane());
pb.setSize(520,500);
pb.setVisible(true);
pb.setResizable(false);
} // end of main()
} //end of class -
Hi.I need help.my iphone was Stolen .how can I get back my iphone. Serial No.DX******PMW.could you help me find my iphone.thank you very much.could you send me the ICCID number to help me find the iphone.if you can help me.
<Personal Information Edited by Host>
Sincerely a Chinese girl really need your helpSorry we are all users on this User Community No Apple Staff
Read this .
http://support.apple.com/kb/HT2526
Apple do not and cannot assist in finding stolen property ,that is the responsility of your Police
Maybe you are looking for
-
Is it possible to print from design view in CS3
I've got a summary print out / display page for a CF application that I'd like to be able to print out in Design view. DW CS3 only seems to print the code page and I don't want to print from a browser as that will only show the options currently sele
-
How can I print mulitple different .ai files onto one page in Illustrator CS6?
How can I print mulitple different .ai files onto one page in Illustrator CS6? I have all of the files organized by Arrange Documents>Tile All in Grid and I would like to print the files in this format so that they can all be seen at once when printe
-
My 3gs is stuck on the apple icon what do i do
i dont know what 2 do my phone has been stuck on the apple icon for like 3 hr now..i can turn it off but when it comes back on all that you see again is the apple...HELP
-
802.11n implementation- First steps
We have around 35 access pints (1230,1240,1260) and 500 clients (RDTs and printers ) in our warehouse running on 802.11b/g, some of the clients support 802.11n and some of them don't. We are planning to upgrade all our clients by the end of the year
-
Lauch_msg() socket is not connected
I installed Lion Server in my Macmini early 2009 and after a while of use when I boot the system it stays stuck at the gray boot screen. If I boot verbose the system last message is lauch_msg() socket is not connected and it remains at it. That's the