Paroxysmal events such as spikes in the newborn EEG are key indicators of central nervous system (CNS) functioning. Newborn EEG seizure events, which are characterised by repetitive spiking events, correspond to CNS dysfunction. Detection and identification of seizure is crucial so that steps can be taken to alleviate the factors causing seizure and to reduce the risk of brain damage. This paper provides a new EEG spike detection method based on an adaptive window optimization algorithm which has been used for an adaptive spectrogram. This technique is assessed using synthetic and real signals containing spikes. The spike detection method is then incorporated into an automatic newborn EEG seizure detection algorithm, which is evaluated using EEG recordings from 8 neonates.