Tried using array, still no joy, why isnt it working?
Hi, followed your advise and changed to array. i now get a java.lang.NullPointerException. Code is as follows:
static XYRMIClient ORBLinks[];
for (int q = 0; q < count; q++){
ORBLinks[q] = new XYRMIClient(this, iparray[q], Port, Message);
The object is being created, so why is it saying null pointer? any help very much appreciated
i should have said, this is a follow up to my previous post, and the code compiles, i get the null pointer when running.
Similar Messages
-
I cannot install adobe flash onto my mac, whenever the installation box appears it asks for a password! I have entered my apple ID password and any other password I use, but still no joy! Any advice?
Exactly where are you getting your Flash from? It is quite free from the maker, no password needed.
http://get.adobe.com/flashplayer/
However, if you fell for a trap and were lured into a fake site to rob you of your Apple ID credentials, I suggest you change your passwords immediately. -
Why isnt this working urgent please help
why isnt this working im trying to connect a panel to a scrollpane the panel will contain several dozen text fields
the scrollpane shouls be about 350, 450 , but the pane is 350
by 1200 the problem now is that the scorllbar isnt created and even when I explictly create it it contains no knob, and it will
not scroll up or down please someone help this is urgent
import java.awt.*;
import com.sun.java.swing.*;
public class ScrollDemo extends JPanel {
private Rule columnView;
private Rule rowView;
private ScrollablePicture picture;
class UnitsListener implements ItemListener {
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
// Turn it to metric.
rowView.setIsMetric(true);
columnView.setIsMetric(true);
} else {
// Turn it to inches.
rowView.setIsMetric(false);
columnView.setIsMetric(false);
picture.setMaxUnitIncrement(rowView.getIncrement());
public ScrollDemo() {
Two t = new Two(columnView.getIncrement());
JScrollPane pictureScrollPane = new JScrollPane(t);
pictureScrollPane.setPreferredSize(new Dimension(300, 250));
pictureScrollPane.setColumnHeaderView(columnView);
pictureScrollPane.setRowHeaderView(rowView);
public static void main(String s[]) {
JFrame frame = new JFrame("ScrollDemo");
frame.setContentPane(new ScrollDemo());
frame.setVisible(true);
import java.awt.*;
import com.sun.java.swing.*;
public class Two extends JPanel implements Scrollable{
private JPanel ivjJPanel3 = null;
private JScrollPane ivjJScrollPane1 = null;
private int maxUnitIncrement = 1;
public Two(int m)
getJPanel1();
maxUnitIncrement = m;
setSize(300,1200);
private void getJPanel1() {
setLayout(null);
setSize(250,1200);
add(getJLabel1(), getJLabel1().getName());
public Dimension getPreferredScrollableViewportSize() {
return getPreferredSize();
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation,
int direction) {
if (orientation == SwingConstants.HORIZONTAL)
return visibleRect.width - maxUnitIncrement;
else
return visibleRect.height - maxUnitIncrement;
public boolean getScrollableTracksViewportHeight() {
return false;
public boolean getScrollableTracksViewportWidth() {
return false;
public int getScrollableUnitIncrement(Rectangle visibleRect,
int orientation,
int direction) {
//Get the current position.
int currentPosition = 0;
if (orientation == SwingConstants.HORIZONTAL)
currentPosition = visibleRect.x;
else
currentPosition = visibleRect.y;
//Return the number of pixels between currentPosition
//and the nearest tick mark in the indicated direction.
if (direction < 0) {
int newPosition = currentPosition -
(currentPosition / maxUnitIncrement) *
maxUnitIncrement;
return (newPosition == 0) ? maxUnitIncrement : newPosition;
} else {
return ((currentPosition / maxUnitIncrement) + 1) *
maxUnitIncrement - currentPosition;
public void setMaxUnitIncrement(int pixels) {
maxUnitIncrement = pixels;I personally didn't play with swing components when they were in the com.sun.java.swing state, but I have a strong feeling it is very buggy and could be causing your problem.
Before posting gui issues, please use a newer API, even jdk1.1 would be fine, anything would be better than what your using.
you wrote: I dont care if its javax.swing or
com.sun.java.swing
I would also gather from this statement that your attitude could be one of your other issues. -
Why isnt drawLine() working??
Does anybody know why the drawLine method isnt doing anything?
ive made sure that done is true when i call it and x1, x2, y1 and y2 all have values. i dont know why it wont work
public void paintComponent (Graphics page)
super.paintComponent(page);
for (City spot : cityList)
page.fillOval ((int)spot.getX(), (int)spot.getY(), SIZE, SIZE);
cityIcon.paintIcon (this, page, (int)spot.getX(), (int)spot.getY());
if(done1 == true)
page.drawLine(x1, y1, x2, y2);
}class Algo1
private static ArrayList<City> cityList = new ArrayList<City>();
static ArrayList<City> goodList = new ArrayList<City> ();
static City thePoint = null;
public Algo1(ArrayList<City> cityList)
Algo1.setCityList(cityList);
public static ArrayList<City> algo1 (ArrayList<City> cityList)
ArrayList<City> thisList = new ArrayList<City> ();
thisList.addAll((ArrayList<City>)cityList);
City tempPoint = null;
double firstXValue = 600;
for (int i = 0; i < cityList.size(); i++)
tempPoint = new City(thisList.get(i).getX(), thisList.get(i).getY(), true);
if (tempPoint.getX() < firstXValue)
thePoint = thisList.get(i);
firstXValue = thePoint.getX();
thisList.get(i).removeCity();
goodList.add(thePoint);
while(!thisList.isEmpty())
thisList = onlyTrue(thisList);
if(!thisList.isEmpty())
thePoint = thisList.get(0);
City nextCity = getNextPoint(goodList.get(goodList.size() - 1), thisList);
nextCity.removeCity();
goodList.add(nextCity);
return goodList;
private static ArrayList<City> onlyTrue(ArrayList<City> trueList)
ArrayList<City> finalList = new ArrayList<City> ();
for (int i = 0; i < trueList.size(); i++)
if (trueList.get(i).checkIt() == false)
trueList.remove(i);
return trueList;
private static City getNextPoint (City tempPoint, ArrayList<City> thisList)
double minDist = 1000000;
Point2D firstCity = tempPoint;
Point2D secondCity = null;
for (int i = 0; i < thisList.size(); i++)
if (firstCity.distance(thisList.get(i)) < minDist)
minDist = firstCity.distance(thisList.get(i));
secondCity = thisList.get(i);
City nextCity = (City)secondCity;
return (City)secondCity;
public static void setCityList(ArrayList<City> cityList) {
Algo1.cityList = cityList;
public static ArrayList<City> getCityList() {
return cityList;
class City extends Point
double x;
double y;
boolean onList;
public City (double x, double y, boolean onList){
this.x = x;
this.y = y;
this.onList = onList;}
public City (Point abc){
this.x = abc.getX();
this.y = abc.getY();
onList = true;}
public boolean removeCity(){
onList = false;
return onList;}
public double getX(){
return x;}
public double getY(){
return y;}
public boolean checkIt(){
return onList;}
class CityList
static ArrayList<City> cityList = new ArrayList<City>();
public CityList()
cityList = cityListReader();
public static ArrayList<City> cityListReader()
Vector<Double> xCoord = new Vector<Double>();
xCoord.addElement(new Double(78));
xCoord.addElement(new Double(399));
xCoord.addElement(new Double(207));
xCoord.addElement(new Double(557));
xCoord.addElement(new Double(280));
xCoord.addElement(new Double(156));
xCoord.addElement(new Double(285));
Vector<Double> yCoord = new Vector<Double>();
yCoord.addElement(new Double(326));
yCoord.addElement(new Double(194));
yCoord.addElement(new Double(306));
yCoord.addElement(new Double(132));
yCoord.addElement(new Double(143));
yCoord.addElement(new Double(257));
yCoord.addElement(new Double(365));
for (int i = 0; i < xCoord.size(); i++)
City newCity = new City((double)((Double)xCoord.elementAt(i)),
(double)((Double)yCoord.elementAt(i)), true);
cityList.add(newCity);
return cityList;
} -
I have Win7 64 bit and when I tried to install the latest I-Tunes update it failed and told me to reinstall. I attempted the reinstall and got the same result. I have attempted this several times already even after following the recommendations from Apple website to correct this problem. I have installed numerous updates for I-Tunes and this is the first one to fail. Is there a fix in the works from Apple for this? I believe the update is flawed and should be re-evaluated by Apple and this update re-issued with different version #.
Hi skyhawk536,
If you are having issues with iTunes after an attempted update, you may find the following article helpful:
iTunes 11.1.4 for Windows: Unable to install or open
http://support.apple.com/kb/TS5376
Regards,
- Brenden -
Look, I have SERIOUS problems with my MacBook Pro, a computer that was given to me by Apple to replace a MacBook Pro that was defective from day one. Now this fabulous machine from Apple is totally messed up since the upgrade to Mavericks. I've talked with "Senior Advisors" until I'm blue in the face, but NOTHING fixes this machine. So can SOMEONE out there PLEASE HELP ME?
I live in rural Ireland, I cannot drive because I was in a coma at years ago (although I could drive if I had 10+ DUIs), I'm over two hours from the closest Apple Authorized Repair, I'm physical disablled and mobility impaired, and I'm terminallly ill. So from where I stand, I really don't have time to sit around and wait. It took Apple 11 months to sort out the problem with my original MacBook Pro; I don't HAVE 11 months to wait for this problem to be fixed, but I've been waiting now for over 2 months, and my death clock is ticking.
PLEASE HELP ME!!! TIME IS OF THE ESSENCE BECAUSE I'M DYING!!! Now is that clear enough for you, Apple?
Sincerely,
Kathleen Trevena-Ruane
<Personal Information Edited by Host>Have you tried to erase your drive and reinstall the OS - you should use recoery (hold Command + R keys while restarting). Since the items in the menu bar are part of the system, a clean reinstall of the system should take care of it.
As it is dangerous to post private information in a public forum, I will ask the hosts to remove it.
FWIW, we are all other users here - you are not addressing Apple. -
I just download the 4.0 version and my scroll pad on my laptop won't work. I have to use my arrow keys or the side bar on the side. The scroll pad works with Internet Explorer and anywhere else just not with Firefox's newest version.
This one is easy. The shortcut is for the old iTunes, that is why it won't work.
I assume you are using Windows.
If so, go to the bottom left of your screen and click the start button. Go up to programs and hold your cursor over it. A list of all your programs should pop up to the right. Move the curso over to iTunes. There should be an "about iTunes" and an iTunes logo there. Right click on the iTunes logo and click create shortcut (you can also just drag it out to your desktop). That will give you a desktop shortcut for your new version. -
After a big loss of out-pulled hair here is the code:
setInterval() calls getNewMess function but it happens
nothing with onNewMess function.
Instead, if i click refresh-button, it gives me result
correctly.evt.target._parent
is just using the event argument that is dispatched to and
therefore received by your listener function. It is dispatched/sent
by your button component instance. The event object from components
- in as2 - normally contains at least two properties. A type
property... in this case that's "click" , because its a click event
and a target property. The target property is a reference to the
component instance from which the event originated. It can be
particularly useful if you have one listener handling events from
many sources. So.....
evt.target._parent is referring to the container clip of the
instance that sent the event. i.e. The _parent of the button in
this case.
That's why I replaced it with t (=this) which is a reference
to the timeline that the button is running in. Now it doesn't need
to get that reference from checking the _parent of the evt.target
property from the evt argument. Which means the argument that the
newMess function receives can be ignored and its no longer reliant
on it. Sounds confusing but once you "get" it, it all makes sense.
Eventually, lol.
And of couse you don't need to have a button if you don't
want one. -
hi, i am on a deployment adn trying to facetime y husband at home, but when i try to call him he cant answer, and if he calls me i dont even see the call coming in. i tried with my sister next and no luck, so i know it is me. is there any way to troublshoot, i am having trouble finding any info online to this.
See the Troubleshooting Section in this Article on Using FaceTime,
http://support.apple.com/kb/ht4319
And these Discussions may be of Interest...
https://discussions.apple.com/message/15019526#15019526
https://discussions.apple.com/message/16502324 -
Why isn't this formail cgi working?
http://megacyberteck.com/contact.html
Thanks for helping>
http://megacyberteck.com/contact.html
>
the server is treating the script like a TEXT file.
http://megacyberteck.com/formmail.cgi
Properly working, that version of formmail.cgi script will
give a copyright
and "missing recipient" error message when you load it
directly into the
browser.
as the others have said- most hosts require cgi files to be
in a specific
cgi-bin directory for them to be allowed to execute.
and- if on Apache server, you have to give the file
permission to execute,
as the README instructions detail on chmod'ing the file to
755.
http://uptime.netcraft.com/up/graph?site=megacyberteck.com
okay, it's Apache/Unix
See your host's FAQ/Support section.
Also, it's fairly common for the cgi-bin folder to be in the
private top
level root of your hosting. It's also very common on that
type of hosting
for a "formmail-clone" script to already be preinstalled and
ready for use.
If your hosting has a control panel or CPanel, go to it and
look around. -
Why isnt imessage working?
I dont know why but today my messages with all my iphone friends turned green and it isnt imessage anymore, anyone know why?
Hi, I have a very easy solution. It took me only 3 seconds. Go to Settings>messages, activate iMessage and deactivate sms. Next time you send a text, it will automatically send as iMessage!
-
I cant connect my phone to itunes when i plug in the usb why isnt it working?
I tried both my iphones and none of them seem to be sycing in with my itunes on my desktop.
Hello Wameng,
Go through the section 5. Verify that the Apple Mobile Device USB Driver is installed from the link below
http://support.apple.com/kb/ts1538 -
HT204380 Why isnt this working
I have an Ipad2, every single time i facetime with someone using a iphone 4s, i can hear what they are saying but they can't hear what i am saying.how do i fix this?...i enjoy having to write down what i think on paper, but i would rather talk =)
Using FaceTime http://support.apple.com/kb/ht4319
Troubleshooting FaceTime http://support.apple.com/kb/TS3367
The Complete Guide to FaceTime: Set-up, Use, and Troubleshooting Problems
http://tinyurl.com/32drz3d
I saw one post where a user said dust got inside the small microphone hole. Using a vacuum cleaner removed the dust and restored the audio.
Cheers, Tom -
Why isnt this working? add container to frame..
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class MortgageCalcFrame {
private static void createAndShowGUI() {
//Create and set up the window.
JFrame frame = new JFrame("Mortgage calculator");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Add's a container in the frame
Container content = new Container();
frame.getContentPane().add(content, BorderLayout.SOUTH);
JButton btn = new JButton("test");
content.add(btn, BorderLayout.EAST);
JTextField input = new JTextField(5);
frame.getContentPane().add(input, BorderLayout.CENTER);
//Display the window.
frame.pack();
frame.setVisible(true);
public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}Well the problem you got is that the layout of a Container is null. You've got several options here.
1. You set a layout for your container like this
Container content = new Container();
content.setLayout(new FlowLayout());2. You use a different container that inherits from container like Panel or JPanel since this one already got a FlowLayout set.
Panel content = new Panel();or
JPanel content = new JPanel(); //better since you're currently mixing Swing components and AWT. -
Why isnt video working w a 30 pin to rca adpater
im trying to see video and audio fron a 30 pin to rca adpater. the sound is there but no video.. is there something I missed in the settings or is this just not gonna work
Have you tried:
- Reset the iOS device. Nothing will be lost
Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Reset all settings
Go to Settings > General > Reset and tap Reset All Settings.
All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
- Restore from backup. See:
iOS: How to back up
- Restore to factory settings/new iOS device.
You are not addressing Apple here we are al just users like yourself.. If the above does not work then inform Apple by:
Apple - iPod touch - Feedback
Maybe you are looking for
-
I have NO status light on my Airport/Time Machine, I unplugged the internet connection from back of Airport and plugged directly into my MAC and am able to get to the internet just fine. The Airport is almost 6 years old Is my Airport dead and just n
-
Hi all, Is there any standard report in SAP which will give 1=> The time between the GRN and UD. 2=>The ratio of lots inspected & rejected for a period The report input and output should show the inspection lot number. I tried with MCXA but it does
-
InDesign CS3 Swatch Palette Problem
Hi, I have an issue in InDesign where the "Pantone Solid Coated" library is covering any other colour book I am trying to work with, including CMYK etc. Also I have to change a colour from Process to Spot and then back to Process again to be able to
-
Is it possible for two servers to receive broadcasts on the same port?
I'm trying to run multiple instances of a class that creates a UDP socket that receives broadcast packets on a specific port: socket = new DatagramSocket(port); The second and succeeding instances get a BindException because the address is already in
-
Some thoughts on Permissions Repair Failure and Software Update Failure
Here is what I am thinking about these issues. There are a few documented errors that are common when permissions repair is performed and the general consensus at this point is that these errors do not constitute a grave concern. But not being able t