Port forwarding doesn't appear to be working.
I'm trying to port forward my RDP ports on my Airport extreme so I can access my Windows machine from outside my local network.
I've forwarded port 3389 to the correct IP but I can't connect. I can connect from inside my network by using my internal IP address but if i try to connect with my external ip address it will not connect.
I've disabled the windows firewall but this was all working on my netgear router that I had before I got the airport extreme.
I've also tried port scanning the router from my mac mini and it does not detect that port 3389 is open.
I was able to get it working by making my main machine the default host but I would prefer to not expose my main machine to the internet like this. Any idea why it's not working?
Similar Messages
-
WRT120N - DMZ works, port forwarding doesn't work; only one device allowed in DMZ
Hi,
I have an WRT120N router and two DVRs. I can get either one of the DVRs to work just fine if I put it in the DMZ. Neither one works when I enable port forwarding. Since I cannot have two devices in the DMZ with this router, I cannot use that approach (throwing them in the DMZ) as a viable solution.
I need help finding out what I am doing incorrectly with the port forwarding. Basically I am creating an entry for each port of each device, going to the correct IP address of that device. I have tried both protocols as well as just TCP. This does not work. Just for fun, I tried using the port range forwarding and this does not work either. The only thing that works is if I throw either of the devices in the DMZ.
So what I have essentially is this:
DEVICE1 / 192.168.0.120 (internal) / PORT 999 / works great in DMZ but not in port fwd
DEVICE2 / 192.168.0.121 (internal) / PORT 456 / works great in DMZ but not in port fwd
I have used Wireshark from a remote computer to observe what happens when I navigate to the URL that I need, such as http://myjunk.ddnsprovider.xyz:999 (where 999 is the port on which the device in question serves). I don't see anything out of the ordinary. (I assume there is no way to run a packet sniffer on the router.) (Can we "telnet" into the router, btw?)
So either I am doing something wrong, or there is a need for a router software update, or the router is blocking some other protocol, etc. Help is much appreciated! BTW, tried with the router firewall off, too. No go.
Regards,
MikeWhats the current firmware installed on your router? Have you tried to upgrade the firmware on your Router?
-
Port Forwarding for RDP 3389 is not working
Hi,
I am having trouble getting rdp (port 3389) to forward to my server (10.20.30.20). I have made sure it is not an issue with the servers firewall, its just the cisco. I highlighted in red to what i thought I need in my config to get this to work. I have removed the last 2 octets of the public IP info for security .Here is the configuration below:
TAMSATR1#show run
Building configuration...
Current configuration : 11082 bytes
version 15.2
no service pad
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
service password-encryption
hostname TAMSATR1
boot-start-marker
boot system flash:/c880data-universalk9-mz.152-1.T.bin
boot-end-marker
logging count
logging buffered 16384
enable secret
aaa new-model
aaa authentication login default local
aaa authentication login ipsec-vpn local
aaa authentication login ciscocp_vpn_xauth_ml_1 local
aaa authorization console
aaa authorization exec default local
aaa authorization network groupauthor local
aaa session-id common
memory-size iomem 10
clock timezone CST -6 0
clock summer-time CDT recurring
crypto pki token default removal timeout 0
crypto pki trustpoint TP-self-signed-1879941380
enrollment selfsigned
subject-name cn=IOS-Self-Signed-Certificate-1879941380
revocation-check none
rsakeypair TP-self-signed-1879941380
crypto pki certificate chain TP-self-signed-1879941380
certificate self-signed 01
3082024B 308201B4 A0030201 02020101 300D0609 2A864886 F70D0101 04050030
31312F30 2D060355 04031326 494F532D 53656C66 2D536967 6E65642D 43657274
69666963 6174652D 31383739 39343133 3830301E 170D3131 30393136 31393035
32305A17 0D323030 31303130 30303030 305A3031 312F302D 06035504 03132649
4F532D53 656C662D 5369676E 65642D43 65727469 66696361 74652D31 38373939
34313338 3030819F 300D0609 2A864886 F70D0101 01050003 818D0030 81890281
8100BD7E 754A0A89 33AFD729 7035E8E1 C29A6806 04A31923 5AE2D53E 9181F76C
ED17D130 FC9B5767 6FD1F58B 87B3A96D FA74E919 8A87376A FF38A712 BD88DB31
88042B9C CCA8F3A6 39DC2448 CD749FC7 08805AF6 D3CDFFCB 1FE8B9A5 5466B2A4
E5DFA69E 636B83E4 3A2C02F9 D806A277 E6379EB8 76186B69 EA94D657 70E25B03
542D0203 010001A3 73307130 0F060355 1D130101 FF040530 030101FF 301E0603
ip dhcp excluded-address 10.20.30.1 10.20.30.99
ip dhcp excluded-address 10.20.30.201 10.20.30.254
ip dhcp excluded-address 10.20.30.250
ip dhcp pool tamDHCPpool
import all
network 10.20.30.0 255.255.255.0
default-router 10.20.30.1
domain-name domain.com
dns-server 10.20.30.20 8.8.8.8
ip domain name domain.com
ip name-server 10.20.30.20
ip cef
no ipv6 cef
license udi pid CISCO881W-GN-A-K9 sn
crypto vpn anyconnect flash:/webvpn/anyconnect-dart-win-2.5.3054-k9.pkg sequence 1
ip tftp source-interface Vlan1
class-map type inspect match-all CCP_SSLVPN
match access-group name CCP_IP
policy-map type inspect ccp-sslvpn-pol
class type inspect CCP_SSLVPN
pass
zone security sslvpn-zone
crypto isakmp policy 10
encr aes 256
authentication pre-share
group 2
crypto isakmp policy 20
encr aes 192
authentication pre-share
group 2
crypto isakmp key password
crypto isakmp client configuration group ipsec-ra
key password
dns 10.20.30.20
domain tamgmt.com
pool sat-ipsec-vpn-pool
netmask 255.255.255.0
crypto ipsec transform-set ipsec-ra esp-aes esp-sha-hmac
crypto ipsec transform-set TSET esp-aes esp-sha-hmac
crypto ipsec profile VTI
set security-association replay window-size 512
set transform-set TSET
crypto dynamic-map dynmap 10
set transform-set ipsec-ra
reverse-route
crypto map clientmap client authentication list ipsec-vpn
crypto map clientmap isakmp authorization list groupauthor
crypto map clientmap client configuration address respond
crypto map clientmap 10 ipsec-isakmp dynamic dynmap
interface Loopback0
ip address 10.20.250.1 255.255.255.252
ip nat inside
ip virtual-reassembly in
interface Tunnel0
description To AUS
ip address 192.168.10.1 255.255.255.252
load-interval 30
tunnel source
tunnel mode ipsec ipv4
tunnel destination
tunnel protection ipsec profile VTI
interface FastEthernet0
no ip address
interface FastEthernet1
no ip address
interface FastEthernet2
no ip address
interface FastEthernet3
no ip address
interface FastEthernet4
ip address 1.2.3.4
ip access-group INTERNET_IN in
ip access-group INTERNET_OUT out
ip nat outside
ip virtual-reassembly in
no ip route-cache cef
ip route-cache policy
ip policy route-map IPSEC-RA-ROUTE-MAP
duplex auto
speed auto
crypto map clientmap
interface Virtual-Template1
ip unnumbered Vlan1
zone-member security sslvpn-zone
interface wlan-ap0
description Service module interface to manage the embedded AP
ip unnumbered Vlan1
arp timeout 0
interface Wlan-GigabitEthernet0
description Internal switch interface connecting to the embedded AP
switchport mode trunk
no ip address
interface Vlan1
description $ETH-SW-LAUNCH$$INTF-INFO-HWIC 4ESW$
ip address 10.20.30.1 255.255.255.0
ip nat inside
ip virtual-reassembly in
ip tcp adjust-mss 1452
ip local pool sat-ipsec-vpn-pool 10.20.30.209 10.20.30.239
ip default-gateway 71.41.20.129
ip forward-protocol nd
ip http server
ip http access-class 23
ip http authentication local
ip http secure-server
ip http timeout-policy idle 60 life 86400 requests 10000
ip dns server
ip nat inside source list ACL-POLICY-NAT interface FastEthernet4 overload
ip nat inside source static tcp 10.20.30.20 3389 interface FastEthernet4 3389
ip nat inside source static 10.20.30.20 (public ip)
ip route 0.0.0.0 0.0.0.0 public ip
ip route 10.20.40.0 255.255.255.0 192.168.10.2 name AUS_LAN
ip access-list extended ACL-POLICY-NAT
deny ip 10.0.0.0 0.255.255.255 10.20.30.208 0.0.0.15
deny ip 172.16.0.0 0.15.255.255 10.20.30.208 0.0.0.15
deny ip 192.168.0.0 0.0.255.255 10.20.30.208 0.0.0.15
permit ip 10.20.30.0 0.0.0.255 any
permit ip 10.20.31.208 0.0.0.15 any
ip access-list extended CCP_IP
remark CCP_ACL Category=128
permit ip any any
ip access-list extended INTERNET_IN
permit icmp any any echo
permit icmp any any echo-reply
permit icmp any any unreachable
permit icmp any any time-exceeded
permit esp host 24.153. host 66.196
permit udp host 24.153 host 71.41.eq isakmp
permit tcp host 70.123. host 71.41 eq 22
permit tcp host 72.177. host 71.41 eq 22
permit tcp host 70.123. host 71.41. eq 22
permit tcp any host 71..134 eq 443
permit tcp host 70.123. host 71.41 eq 443
permit tcp host 72.177. host 71.41. eq 443
permit udp host 198.82. host 71.41 eq ntp
permit udp any host 71.41. eq isakmp
permit udp any host 71.41eq non500-isakmp
permit tcp host 192.223. host 71.41. eq 4022
permit tcp host 155.199. host 71.41 eq 4022
permit tcp host 155.199. host 71.41. eq 4022
permit udp host 192.223. host 71.41. eq 4022
permit udp host 155.199. host 71.41. eq 4022
permit udp host 155.199. host 71.41. eq 4022
permit tcp any host 10.20.30.20 eq 3389
evaluate INTERNET_REFLECTED
deny ip any any
ip access-list extended INTERNET_OUT
permit ip any any reflect INTERNET_REFLECTED timeout 300
ip access-list extended IPSEC-RA-ROUTE-MAP
deny ip 10.20.30.208 0.0.0.15 10.0.0.0 0.255.255.255
deny ip 10.20.30.224 0.0.0.15 10.0.0.0 0.255.255.255
deny ip 10.20.30.208 0.0.0.15 172.16.0.0 0.15.255.255
deny ip 10.20.30.224 0.0.0.15 172.16.0.0 0.15.255.255
deny ip 10.20.30.208 0.0.0.15 192.168.0.0 0.0.255.255
deny ip 10.20.30.224 0.0.0.15 192.168.0.0 0.0.255.255
permit ip 10.20.30.208 0.0.0.15 any
deny ip any any
access-list 23 permit 70.123.
access-list 23 permit 10.20.30.0 0.0.0.255
access-list 24 permit 72.177.
no cdp run
route-map IPSEC-RA-ROUTE-MAP permit 10
match ip address IPSEC-RA-ROUTE-MAP
set ip next-hop 10.20.250.2
banner motd ^C
UNAUTHORIZED ACCESS TO THIS NETWORK DEVICE IS PROHIBITED.
You must have explicit permission to access or configure this device. All activities performed on this device are logged and violations of this policy may result in disciplinary and/or legal action.
^C
line con 0
logging synchronous
line aux 0
line 2
no activation-character
no exec
transport preferred none
transport input all
line vty 0
access-class 23 in
privilege level 15
logging synchronous
transport input telnet ssh
line vty 1 4
access-class 23 in
exec-timeout 5 0
privilege level 15
logging synchronous
transport input telnet ssh
scheduler max-task-time 5000
ntp server 198.82.1.201
webvpn gateway gateway_1
ip address 71.41. port 443
http-redirect port 80
ssl encryption rc4-md5
ssl trustpoint TP-self-signed-1879941380
inservice
webvpn context TAM-SSL-VPN
title "title"
logo file titleist_logo.jpg
secondary-color white
title-color #CCCC66
text-color black
login-message "RESTRICTED ACCESS"
policy group policy_1
functions svc-enabled
svc address-pool "sat-ipsec-vpn-pool"
svc default-domain "domain.com"
svc keep-client-installed
svc split dns "domain.com"
svc split include 10.0.0.0 255.0.0.0
svc split include 192.168.0.0 255.255.0.0
svc split include 172.16.0.0 255.240.0.0
svc dns-server primary 10.20.30.20
svc dns-server secondary 66.196.216.10
default-group-policy policy_1
aaa authentication list ciscocp_vpn_xauth_ml_1
gateway gateway_1
ssl authenticate verify all
inservice
endHi,
I didnt see anything marked with red in the above? (Atleast when I was reading)
I have not really had to deal with Routers at all since we all access control and NAT with firewalls.
But to me it seems you have allowed the traffic to the actual IP address of the internal server rather than the public IP NAT IP address which in this case seems to be configured to use your FastEthernet4 interfaces public IP address.
There also seems to be a Static NAT configured for the same internal host so I am wondering why the Static PAT (Port Forward) is used?
- Jouni -
Port Forwarding on Home Hub 5 not working
Hi,
Is anybody else having problems getting ports to forward on their Home Hub or Home Hub 5?
I am a new BT customer, less than a week infact and BT have been utterly hopeless in getting this resolved. All they do is send me instructions for port forwarding on a homehub which I do not need and tell me that i need to pay for their tech support to investigate it further which is freaking ridiculous considering port forwarding is an essential part of any router and this router is brand new, less than a week old. (Do BMW sell you a car and then refuse to take responsibility for a broken engine?)
My other option is buying an ADSL 802.11ac router for £150 which out of principle, i dont think i should have to do. One of the reasons i came to BT in the first place was because the homehub is supposed to be one of the best free provider supplied routers around.
Please only reply to this if you know what you are talking about or have experienced this same issue yourselves. I reiterate that I have not missed any configuration steps on my part and this is a case of the homehub simply not working as it is designed.
Scenario:
I like to have remote desktop access to my home computer from external networks. I do not use 3rd party software such as 'log me in' or 'team viewer', I like to use Microsoft Remote desktop and had been doing so for years with my Sky broadband until last week.
I have dynamic DNS running on my machine which updates my constantly changing external IP to the dns server so dont worry about that, thats all good.
I have correctly set up the forwarding of TCP 3389 to the static I.P of my home desktop on the homehub (and rebooted and or factory reset several times)
Result:
Nothing. The homehub displays as though it has forwarded the ports yet i am still unable to remote in from an external network. The port shows as closed when i run a port scanner.
The same goes for other ports I have tried to open. For example, my Xbox One.
BT are sending me out a replacement Hub to try but I fear that this will have the same result as i have seen a few other people post with the same issues.
If anybody has experienced and or resolved this, please let me know and i will be forever grateful
Thank youWhen you do a major network revision always reset the TC to factory and start over.. it simply remembers too much of the last setup.
Plug WAN TC into the HH5 and run through the airport utility again. The TC must go into bridge mode. It then should work fine, but I recommend particularly with Mavericks you use strict naming.
Not apple names.. long, loose and loopy.
Names that are short, 2-10 characters is plenty but make an upper limit of 20.
No spaces..
Pure alphanumeric.. no apostrophe or any other odd character. -
I have two domains. One is an account domain with a one way trust with the resource domain. Resource domain trusts the account domain and has a number of 2008R2 servers running within. I am experiencing severe logon delays
due to these servers being unable to access the server that hosts the user home folder specified directly on the user account profile tab from the account domain. When using my workstation in the actual account domain (corporate) I have no
problems.
Because of these network restrictions, I need to override the 2008R2's desire to access that user home folder location in the account domain.
So far the best thing I have found to try is Windows Components/remote desktop services/remote desktop session host/profile/Set Remote Desktop User Home Directory
The problem is that so far I have tried to configure this to point to both a local folder as well as a network path and it doesn't appear to be doing anything. Not seeing any errors in the app or system log either.
It is still trying to map the path in the account domain.
Any ideas?
Is there a better way to accomplish my goal? The servers in the resource domain will be Citrix servers and there will be a lot of users connecting from the account domain.
I tried this setting too, but it only seems to work on the 2012 machines in my Resource domain.
With the introduction of Windows 8 and Windows Server 2012 there is now a new group policy setting called “Set user home folder” and is found under Computer Configuration > Policies > Administrative Templates > System > User Profiles
Help!Hi,
This might be due to permission problems. Please check whether the user accounts for whose home folder to be redirected have permissions in the shared folder specified in the server.
Checkout the below link on Best Practice for creating Roaming Profile and Folder Redirection
http://www.grouppolicy.biz/2010/08/best-practice-roaming-profiles-and-folder-redirection-a-k-a-user-virtualization/
Regards,
Gopi
JiJi
Technologies -
Port Forwarding in WRT54GL Router does not work
When i forward ports in the firware it does not work correctly. I tested it using http://www.yougetsignal.com/tools/open-ports/ and it still said that the port was closed.
Who is your ISP. When you do port forwarding make sure you have entered the IP address of the computer for which you need to enable port forwarding. Under "Security" Tab uncheck "Block Anonymous Internet Request" and click on Save Settings.After this try testing if that port is opened or not.What ports numbers you are trying to open on your router.
-
Port forwarding on Sagem 2504 has stopped working
I've had port forwarding configured and working on my Sagem 2504 router for months without issue.It suddenly seems to have stopped working.I have an unconfirmed suspicion this may be linked to the 3.18Skya4G firmware update - when was this update pushed out?I've tried deleting the rules and recreating them and also deleting/recreating the custom services and the rules. None of the above solves the problem.Someone else is reporting the exact same issue here.
Based on Borez' post I tried deleting everything and starting over. This *seems* to have fixed the problem. I believe the steps I followed were as follows:Delete all services and port forwarding rules.Reboot router.Recreate servicesRecreate rulesReboot routerSimilar to Borez the services/rules I recreated were identical to those which were there before - so no apparently good reason why this should have worked.
-
Port forwarding and LAN traffic suddenly stopped working
My WRT54G was chugging along happily for many months, and suddenly all port forwarding and local LAN traffic stopped flowing. All PCs behind the router on the LAN side can get to all WAN sites just fine, but they cannot ping one another. All of them can ping the router (192.168.1.1) just fine.
Any ideas?
Thanks,
CurtisI solved this. Turned out to not be the router at all, but the accidental enablement of the "Stateful Firewall" within my Cisco VPN client. Once this option is turned on, the machine gets isolated from the LAN, even when the VPN client isn't visibly running.
-
Port Forwarding doesn't work even though I did everything properly
I am trying to set up a server that went down after I tried a different way of hosting it with a program that messed everything up and when ever i try forwarding any port, even though I know how, I do everything I need to do and I check if my port is open on canyouseeme.org and it shows up as no route to host. Is there a firewall in the airport i need to disable for it to work?
Problem fixed. Had to uninstall Flash from the control panel and then reinstall.
-
Evince fullscreen doesn't appear to be working properly
Ever since that update to evince that made everything really pretty, the option to view documents in fullscreen mode doesn't work properly. Instead of removing the title bar, a second title bar is created under the first one, and this second bar disappears after some time, and can be brought back with the mouse. It is useful to note that this only occurs when I use my window manager of choice, xmonad, and presumably any other tiling window manager. The only other one I tried was openbox, and while using that evince performed admirably. Is this a bug with evince not playing nicely with tiling window managers? Is there a workaround that is known? I would appreciate any help with this issue. Here's the very top left bit of a screenshot (because of arch's rule about no images larger than 250x250):
Edit: got that image link working
Last edited by rh995 (2015-01-07 02:02:30)I went ahead and filed a bug report for this because it sure seems like this is a problem with evince: https://bugzilla.gnome.org/show_bug.cgi?id=742736
-
Imatch doesn't appear to be working
I purchased the imatch service but it doesn't seem to be functioning properly. I've turned on imatch but it doesn't indicate that it is matching my music, not is it providing any feedback messages explaining it's working or if there are errors.
I've uploaded many CDs into the itunes library and I've imported mp3 files. The only songs what have the "cloud" icon are ones that were actually purchased through itunes.
What am i doing wrong? I thought that once imatch was turned on it would perform automatically.Hi,
Add Icloud status field to the song view. You can do this by going to the main menu > view > view options. Tick Icloud status.
Now look at you library. What is the Icloud Status for each track.
Jim -
I've noticed that when I try to burn a playlist to CD, I could set how many seconds between tracks (0 to 5). That drop down menu is still there but it doesn't seem to be functional now. It always defaults to 0 seconds, no matter what number in the drop down list I choose. I'm using iTunes 11.0.1 with Mountain Lion. I tend to burn at 1x speed.
Mick,
Make a different playlist that has entirely different songs from the first playlist, and contains less than 70 minutes of music. Does it burn? -
Public Secure Packet Forwarding does not appear to be working on APs
I have enabled PSPF on my Cisco APs and protected ports on the switch ports. Yet wireless clients can still see each other on the wireless net. Am I missing a step? Shouldn't host A (172.20.200.5) not be able to browse/ping host B (172.20.200.6)?
Example AP
interface Dot11Radio0.100
bridge-group 100
bridge-group 100 subscriber-loop-control
bridge-group 100 port-protected
Example Switch Port
description BlueAP
switchport trunk encapsulation dot1q
switchport trunk native vlan 99
switchport trunk allowed vlan 99-102
switchport mode trunk
switchport nonegotiate
switchport protected
duplex full
speed 100
no mdix autoHi,
PSPF is used only when you don't want wireless clients to access shared folders with each other. Try it.
Regards -
TableModelListener doesn't appear to be working
Hi,
I have the following code that is called when a menu item is selected. When the method tableChanged is commented out, the table is displayed just fine. With it in, even if the if statements are commented out, it doesn't display. I just get the frame title being displayed.
import javax.swing.*;
import java.awt.*;
import javax.swing.table.*;
import java.awt.event.*;
import javax.swing.event.*;
import javax.swing.event.TableModelEvent;
public class updateCurrentHiLo extends JTable implements TableModelListener {
public updateCurrentHiLo() {
super();
String[] columnNames = {"Currency",
"Current Hi",
"Current Lo"};
Object[][] data = {
{"AUD/USD",DataCapture.currentHigh[0], DataCapture.currentLow[0]},
{"GBP/USD",DataCapture.currentHigh[1], DataCapture.currentLow[1]},
{"EUR/USD",DataCapture.currentHigh[2], DataCapture.currentLow[2]},
{"EUR/JPY",DataCapture.currentHigh[3], DataCapture.currentLow[3]},
{"USD/JPY",DataCapture.currentHigh[4], DataCapture.currentLow[4]},
{"USD/CHF",DataCapture.currentHigh[5], DataCapture.currentLow[5]},
{"USD/CAD",DataCapture.currentHigh[6], DataCapture.currentLow[6]},
{"NZD/USD",DataCapture.currentHigh[7], DataCapture.currentLow[7]}
DefaultTableModel model = new DefaultTableModel(data, columnNames);
//model.addTableModelListener( this ); //We can now check whether the table has been updated.
setModel(model);
//setFont( new Font("Garamond", Font.BOLD, 50)); //Set the look and feel of the table
//setRowHeight(50); //If you change font size don't forget to change the row height.
setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
doLayout();
setPreferredScrollableViewportSize(getPreferredSize());
model.addTableModelListener( this ); //We can now check whether the table has been updated.
public void tableChanged(TableModelEvent e) {
TableModel model = getModel();
if (e.getType() == TableModelEvent.UPDATE)
int row = e.getFirstRow();
int column = e.getColumn();
/*if ( column == 1 && DhbMath.equals( ((Double)model.getValueAt(row,column)).doubleValue(),DataCapture.currentHigh[row] ) == false ) {
DataCapture.currentHigh[row] = ((Double)model.getValueAt(row,column)).doubleValue();
System.out.println(DataCapture.currentHigh[row]);
/*else if ( column == 2 ) {
DataCapture.currentLow[row] = ((Double)model.getValueAt(row,column)).doubleValue();
}This is the code that calls the table:
public void actionPerformed(ActionEvent e) {
JMenuItem source = (JMenuItem)(e.getSource());
if ( source.getText().equals("Exit") ) {
int clickVALUE = JOptionPane.showConfirmDialog(null, "Are you sure you want to quit?", "Quit Confirmation", JOptionPane.YES_NO_OPTION);
if (clickVALUE == 0) {
System.exit(0);
else {
if ( source.getActionCommand().equals("HiLo") ) {
//Do summin
JFrame test = new JFrame("Update Current Highs and Lows");
test.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
//JOptionPane.showInputDialog(
updateCurrentHiLo table = new updateCurrentHiLo();
JScrollPane scrollPane = new JScrollPane( table );
test.add( scrollPane );
test.pack();
test.setLocationRelativeTo( null );
test.setVisible(true);
}Any help would be appreciated.
Regards,
DaveHi,
I've made a SSCE to illustrate the problem:
Main class: RateTable.java
import javax.swing.*;
import java.awt.*;
import javax.swing.table.*;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.KeyEvent;
import javax.swing.JTabbedPane;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JComponent;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.KeyEvent;
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import javax.swing.JTabbedPane;
import javax.swing.JFrame;
import java.awt.event.WindowEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.KeyEvent;
import java.awt.event.ActionEvent;
import java.util.Date;
import java.util.LinkedList;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.util.StringTokenizer;
import java.net.URL;
import java.io.*;
import java.io.*;
public class RateTable {
private static void createAndShowGUI() {
//Create and set up the window.
MenuCreator createMenu = new MenuCreator();
JFrame frame = new JFrame("TabbedPaneDemo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setJMenuBar(createMenu.createMenuBar());
//Create and set up the content pane.
JComponent newContentPane = new TabbedPaneDemo();
newContentPane.setOpaque(true); //content panes must be opaque
frame.getContentPane().add(new TabbedPaneDemo(), BorderLayout.CENTER);
//Display the window.
frame.pack();
frame.setVisible(true);
public static void main(String[] args) throws IOException {
createAndShowGUI();
}SimpleTable.java
import javax.swing.*;
import java.awt.*;
import javax.swing.table.*;
import javax.swing.event.TableModelEvent;
public class SimpleTable extends JTable {
public SimpleTable() {
super();
String[] columnNames = {"Column 1", "Column 2"};
Object[][] data = {
{"AUD/USD",new Double(0)},
{"GBP/USD",new Double(0)},
DefaultTableModel model = new DefaultTableModel(data, columnNames);
model.addTableModelListener( this ); //We can now check whether the table has been updated.
setModel(model);
setFont( new Font("Garamond", Font.BOLD, 50)); //Set the look and feel of the table
setRowHeight(50); //If you change font size don't forget to change the row height.
setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
doLayout();
}MenuCreator.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.event.*;
import javax.swing.event.TableModelEvent;
import java.lang.Number;
public class MenuCreator implements ActionListener, TableModelListener {
JTextArea output;
JScrollPane scrollPane;
String newline = "\n";
updateCurrentHiLo table;
public JMenuBar createMenuBar() {
JMenuBar menuBar;
JMenu menu, menu2, submenu;
JMenuItem menuItem;
JRadioButtonMenuItem rbMenuItem;
JCheckBoxMenuItem cbMenuItem;
//Create the menu bar.
menuBar = new JMenuBar();
//Build the first menu.
menu = new JMenu("RateTable");
menu.setMnemonic(KeyEvent.VK_R);
menuBar.add(menu);
menuItem = new JMenuItem("Update Current High & Low");
menuItem.setMnemonic(KeyEvent.VK_U);
menuItem.setActionCommand("HiLo");
menuItem.addActionListener(this);
menu.add(menuItem);
return menuBar;
public void actionPerformed(ActionEvent e) {
JMenuItem source = (JMenuItem)(e.getSource());
if ( source.getActionCommand().equals("HiLo") ) {
JFrame test = new JFrame("Update Current Highs and Lows");
test.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
table = new updateCurrentHiLo();
TableModel model = table.getModel();
model.addTableModelListener( this );
JScrollPane scrollPane = new JScrollPane( table );
test.add( scrollPane );
test.pack();
test.setLocationRelativeTo( null );
test.setVisible(true);
public void tableChanged(TableModelEvent e) {
TableModel model = table.getModel();
if (e.getType() == TableModelEvent.UPDATE)
int row = e.getFirstRow();
int column = e.getColumn();
System.out.println("Row "+row);
System.out.println("Column "+column);
if ( column == 1 ) {
Object test = table.getValueAt(row,column);
System.out.println(test);
//If the following line is commented out, we don't have a problem
Double value = (Double)test;
}updateCurrentHiLo.java
import javax.swing.*;
import java.awt.*;
import javax.swing.table.*;
import java.awt.event.*;
import javax.swing.event.*;
import javax.swing.event.TableModelEvent;
public class updateCurrentHiLo extends JTable {
public updateCurrentHiLo() {
super();
String[] columnNames = {"Currency",
"Current Hi",
"Current Lo"};
Object[][] data = {
{"AUD/USD", new Double(0), new Double(0)},
{"GBP/USD", new Double(0), new Double(0)},
{"EUR/USD", new Double(0), new Double(0)},
{"EUR/JPY", new Double(0), new Double(0)},
{"USD/JPY", new Double(0), new Double(0)},
{"USD/CHF", new Double(0), new Double(0)},
{"USD/CAD", new Double(0), new Double(0)},
{"NZD/USD", new Double(0), new Double(0)},
TableModel model = new DefaultTableModel(data, columnNames);
setModel(model);
setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
doLayout();
setPreferredScrollableViewportSize(getPreferredSize());
}TabbedPaneDemo.java
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import javax.swing.JTabbedPane;
import javax.swing.JFrame;
import java.awt.event.*;
public class TabbedPaneDemo extends JPanel {
SimpleTable table = new SimpleTable();
public TabbedPaneDemo() {
super(new GridLayout(1, 1));
JTabbedPane tabbedPane = new JTabbedPane();
//SimpleTable table = new SimpleTable();
JScrollPane scrollPane = new JScrollPane( table );
JPanel panel = new JPanel(false);
panel.add(scrollPane);
panel.setPreferredSize(new Dimension(410, 50));
tabbedPane.addTab("Tab 1", null, panel,
"Does nothing");
tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);
//Add the tabbed pane to this panel.
add(tabbedPane);
//The following line enables to use scrolling tabs.
tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
}Hope someone can help me track down this error. -
Thunderbolt doesn't appear to be working during Migration
Trying to migrate right now from an MBP (running the latest OS) onto a new Air. Wifi is, of course, terrible, so I borrowed a Thunderbolt from a friend, but even that isn't working. Running Migration Assistant on both laptops, each laptop is just searching for the other. The MBP says it's looking for other computers, while the Air says it's looking for a source.
Wifi is turned off on both. The MBP - and subsequently the Air - are work laptops so I'm dead in the water until fixed, yet I don't know where to start. Help?Hi volleyhart,
Welcome to the Apple Support Communities!
When running Migration Assistant using ThunderBolt, I would suggest going through the process step by step as described by the following article. This can be use helpful if neither computer can see the other. The specific steps you will need are in the Migrating using FireWire or ThunderBolt section.
OS X: How to migrate data from another Mac using Mavericks
http://support.apple.com/kb/HT5872
Have a great day,
Joe
Maybe you are looking for
-
How am I able to add and remove people from a group message?
How am I able to add and remove people from a group message?
-
R/3 to AS/400 Interface Design Advice
Hi, I need some design adivice on a Synchronous Interface involving R/3 and and an AS/400 system.The requirement is as follows, The shipping Company uses AS/400 systems,Goods to be shipped are scanned at thier end using hand held scanners,Once a box
-
Hi, Can anyone send me sample docs on technical and functional specs to [email protected] what is functional specs and technical specs ? any diff between them ... pls thro some lights on this Thanks in Advance ss
-
Trouble converting MS SQL 7 ntext to 10g CLOBs
Hola - Using OMWB 10.1.0.2, and I'm having trouble converting over SQL 7 ntext fields to CLOBS; I either wind up with a single character in the CLOB field, the first character in the SQL field, or all text is brought over with spaces in between (repr
-
Extract data from RMS to BI.
Hi experts, I wish to know if its possible to extract data from CRM RMS using BI (7.0). I have read in other topic that it doesn't exist any standar way to do it (using Bussines Content), but that topic was answered some years ago. ¿do you know if th